|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Second Color is not being processed!
Thanks for the Reply!
Well we tried your idea about the primary being bigger then the secondary and it did not work so i posted an image with our two images (The full one and the mask)![]() |
|
#2
|
|||
|
|||
|
Re: Second Color is not being processed!
I know that you said that both colors mask just fine, but I'm really suspicious that your green limits are too narrow. The pink numbers seem like they are the default, but the green hue that is only 10 wide can easily miss the threshold. Similarly, I would set the upper on both lum and sat to 255. I don't think you want to exclude the image when a bright light shines on it.
I loaded your image into Vision Assistant and the attached images shows a line profile diagonal across your green target and a histogram of the green rect. The green target via the line profile is roughly hue of 90, saturation of 100, and luminance of 150. This misses your green threshold on both sat and lum. The second photo is a more accurate description of the color showing the spread of each. So at this point I'd encourage you to put your defaults back for green. It seems like your shop may be a bit dark too, so you may find it useful to up the Brightness parameter on the camera too. Greg McKaskle |
|
#3
|
|||
|
|||
|
Re: Second Color is not being processed!
Well the settings we know are correct because if we choose to track green first, then green is found perfectly while it doesn't find pink at all.
Thanks for the replies, but we're still in trouble! |
|
#4
|
|||
|
|||
|
Re: Second Color is not being processed!
Keep in mind that angling your fabric even a small amount will cause it to reflect very different light to the camera. So tracking green works, then the flat fabric is tilted ten degrees and it disappears.
It is your robot, but I'm telling you, and more importantly, the statistical histogram is telling you that your green settings are the problem. Greg McKaskle |
|
#5
|
|||
|
|||
|
Re: Second Color is not being processed!
Thanks for all your help so far, but the color is perfect because when we want green to load first (notice how there is a check box in the left side of the VI that says "load pink first") if that is un-checked then it finds green just fine, but it doesn't show pink! Whichever color is loaded first is the only one being found.
And thanks again for all of your help. |
|
#6
|
||||
|
||||
|
Re: Second Color is not being processed!
Also make sure that if you're creating a new image and passing it in as Image DST to Color Threshold, etc. If you don't do this, it will do in-place thresholding, which means that it will replace the source image with the filtered red/black image, so when you go to do the filtering for the second color, it won't find it. To fix this, create a new image using IMAQ Create (make sure to give it a different name) and wire the new image into the Image DST input on the first Color Threshold (to be extra safe, create another one for the second Color Threshold as well).
I haven't actually looked at the inside of the demo vision code to see what it does, so you may have already done this when converting the code, but this is a problem I've had before when writing my own vision code. Seeing a glimpse every 30 frames also sounds similar to what I've seen before. --Ryan |
|
#7
|
|||
|
|||
|
Re: Second Color is not being processed!
Since I can't see the diagram, perhaps something else is going on too, but one more time, the measurement above show that in that picture your green was too narrow on all three values. If you do the threshold by hand using the results of the histogram, you will see that the green will not pass.
If you post a picture of the diagram, perhaps we can see if anything else looks fishy. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Color template not loading? | the_waterboy | NI LabVIEW | 4 | 23-01-2009 19:28 |
| Compact rio not being able to use C | kenethare | Programming | 47 | 10-09-2008 22:33 |
| First CROSSING not being scored? | jgannon | Rules/Strategy | 22 | 09-03-2008 11:08 |
| EDU RC not being recognized... | Caleb Fulton | Programming | 5 | 24-03-2003 09:29 |