outline from gadient mask

  • 173 Replies
  • 8719 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6115
  • Mostly Harmless
Re: outline from gadient mask
« Reply #30 on: April 07, 2017, 01:41:49 am »
Hilarious  ;D

*

keghn

  • Trusty Member
  • ********
  • Replicant
  • *
  • 549
Re: outline from gadient mask
« Reply #31 on: April 07, 2017, 03:06:51 pm »
  My statement sill stands. The human in the sigh could be a cartoon video character. Still, A CNN could detect human real or
in a sign or in a cartoon video in a static image. They are that good. And they are pretrained on may examples before they work.

 A hand crafted program could do it but would only work with that program and that sign only. It would not be machine learning.

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #32 on: April 07, 2017, 04:46:03 pm »
@batman I haven't a clue what your talking about show me the step by step algorithm.

*

keghn

  • Trusty Member
  • ********
  • Replicant
  • *
  • 549
Re: outline from gadient mask
« Reply #33 on: April 07, 2017, 04:57:19 pm »

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #34 on: April 07, 2017, 06:24:00 pm »
there is no algorithm there it is simply a brag link, "hey look at our cool software".

*

korrelan

  • Trusty Member
  • ********
  • Replicant
  • *
  • 693
  • Look into my eyes! WOAH!
    • Google +
Re: outline from gadient mask
« Reply #35 on: April 08, 2017, 02:33:11 pm »
I’m pleased you got the basic outline routine working.

I presume your idea is that once you have the bounding limits of your object you are going to search against a dataset to find the object?  As I stated earlier in the thread you are going to hit limitations to this technique at every stage. 

Consider shadows for example.  Shadows obviously exist in any ‘real world’ scene. They are going to give you false outlines and throw your recognition routines off (middle image).  Also using black and white images or objects on a white/ mono colour background is giving you a false sense of accuracy for your routines.



But if you are still intent on following this technique then I will suggest a few other methods/ thoughts along similar lines that might help you; but we are now crossing the line into convolution territory.

The first thing I would do is to segment the image/ lower the images resolution by reading the RGB stepped x,y points into an array.  This will both speed up processing and allow any derived templates to be scaled at a later date to help negate scale invariance.

As show in the above image (on right) using a similar routine to the colour contrast outline I suggested you can posterize the colour palette of the image points in the array. 

.red_bias=60
.red=red*red_bias
.if red>255 then red=255
.do above for RGB

This will have the effect of highlighting the blocks of similar colours. You can adjust the individual colour biases depending on the image you are processing.



Section A in image.

Once you have the low resolution image posterized you could check each x,y array location against a object stack. 

Check the RGB of each block in turn against an array list of RGB values already read from the image.  If the RGB of the block being checked is similar (using another bias) to the block on its left then give it the same number value.  If there is a large difference search your list of already known colours and if found get the number from there or if not found add it to the list and start a number.  You could build a dataset of know hues for faces etc.

You should end up with an array of x,y points where each colour block/ object part has a different number.  You can then easily take your boundaries from this or combine/ average the results with the outline routine boundaries.

Section B in image.

Another method to find the outline of objects could be to use a simple trig routine that checks for a line/ colour change in a clockwise direction at a set diameter from a known point.  If used correctly with convolution filters this would trace the perimeter of a objects colour/ line boundaries.  As the point you are checking is rotated and hits a similar value use that as the centre for the next rotation/ search.  When the start vector is close in proximity to the end vector the loop/ boundary can be closed and logged.  Branches of lines, colour changes will need to be tracked and followed individually of course.

 :)
It thunk... therefore it is!

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #36 on: April 08, 2017, 03:38:36 pm »
you put water in to a cup, it becomes the cup
you put water in to a Tcup, it becomes the Tcup

the key to the recognition would be:
1 linking chronological variations of the image as long as the image is in the frame.
2 giving more importance to the attributes of the image that manifest the A.Is goals :
markers, colors, corners, size.

first though I need to separate the guy in the sign from his wheel chair.

I encountered another time consuming problem : visual studio xamarin compiler doesn't work, the hello
world apk I made doesn't appear on the emulator, so I learned c# for nothing, and I need to learn android studio
so that the A.I would use a phone which weights less than a laptop.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6115
  • Mostly Harmless
Re: outline from gadient mask
« Reply #37 on: April 08, 2017, 05:04:58 pm »
Quote
you put water in to a cup, it becomes the cup
you put water in to a Tcup, it becomes the Tcup

I don't think so. Otherwise how are you going to differentiate between a cup of tea and a cup of coffee.

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #38 on: April 08, 2017, 06:15:23 pm »
I meant the shape of

*

keghn

  • Trusty Member
  • ********
  • Replicant
  • *
  • 549
Re: outline from gadient mask
« Reply #39 on: April 09, 2017, 10:24:10 pm »
i see three objects. The head. the body. the large letter "C"

All three can be turned to chain code.

 Relative chain code are the list of angle values to the next dot. like 10 degrees, 11 degrees, -5 degrees, 12, -5 and so on.

 The starting point would be at the highest point and go around counter clock wise.

 Rule one. The sum of relative chain code for a complete circle is |360| degrees. that would be the head.

 Rule two. The sum of relative angled chain code around a rough blob is also |360| degrees. Surprise? So that would be
the wheel that looks like a "C" and the body.

The head would be 120 dots at all 3 degrees to the next one inline.
So now instead of having a image you can convert the image into a data base. so if you loose the image it can be recreated from the data base.
The head's chain code would look like in the data base would be 120, 3, 500,50.
The 500, 50 is absolute starting position of the head. 500 pixel the right and 50 pixel down.

With objects entered into a data base in this format mean they can be hit with a million types of algorithms. And thus gives you access to what you seek. Morphing images?


« Last Edit: April 09, 2017, 10:44:38 pm by keghn »

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #40 on: April 10, 2017, 02:13:17 pm »
the head breaks of anyways
the body has a break off from the chair that should be utilized

*

keghn

  • Trusty Member
  • ********
  • Replicant
  • *
  • 549
Re: outline from gadient mask
« Reply #41 on: April 10, 2017, 04:29:49 pm »
 The following are guess of the features of the body in relative chain code of a descriptor list.
relative chain code  Features of body outline
pixel length, angles
30,3               +90   back of shoulders
90,0               0     back
30,3               90   joint
100,0               0   back thigh
1,-45               -45   back of knee
90,0               0   back leg
1,90               90   heel
30,0               0   bottom foot
30,6               180 toes
30,0               0    top of foot
1,-90               -90 joint
89,0               0   front of leg shin
15,3               +45   knee
89,0               0   thigh
1,-90               -90 joint
15,0               0   
1,-90               -90  joint
77,0               0   bottom of arm/handle of wheel chair
20,9               +180 fist/hand
77,0               0 top of arm
1,-90               -90
60,0               0 chest
30,3               +90 shoulders, front

909            outline is 909 pixels long.
500, 100 absolute starting position for the body.

If you want to move the body away from the chair or the head then just add  the same movement
value to the absolute x or y position of each body pixel of the body outline.

 If you want to double the size, then multiply all of the pixel lengths by 2,
 To make it half the size divide by two.

 if you want the  arms to move then change the angles at the joints:-)

 But will need to code a subroutine to deal with chain code.
« Last Edit: April 10, 2017, 05:08:00 pm by keghn »

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #42 on: April 12, 2017, 03:45:30 pm »
I'm getting some psyco overlapping rectangles




@kei10 any thoughts ?

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #43 on: April 12, 2017, 03:48:40 pm »

*

yotamarker

  • Trusty Member
  • ********
  • Replicant
  • *
  • 569
Re: outline from gadient mask
« Reply #44 on: April 12, 2017, 03:50:21 pm »
maybe it's not going through the whole thing

 


Users Online

68 Guests, 0 Users

Most Online Today: 78. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles