![]() |
Convex Hull Produces Black Image
OK so our team is having some trouble with image tracking. This is our algorithm so far.
Capture Image->Color Plane Extraction->Threshold->Convex Hull. We are able to to capture the image in code, apply the color plane extraction, and the threshold. We are having trouble with the convex hull. Every time we try to apply a convex hull It gives us a black image. We are retrieving the images by FTP'ing into the cRIO. Any help would be appreciated. |
Re: Convex Hull Produces Black Image
From my experience, a binary image is stored as a grayscale image with values of 0 and 1. Since grayscale is usually 0 to 255, it's impossible to see what is 0 and what is 1. So I usually put it into mspaint and then use the color fill to get it. Of course, that's harder to do if you have lots of small particles and such.
|
Re: Convex Hull Produces Black Image
I agree with the other post. Use the particle analysis step to see if there are particles and what measurements you have. Although, debugging vision code without being able to see images is not my favorite pastime.
Greg McKaskle |
Re: Convex Hull Produces Black Image
If you save them as .png they should open in windows picture viewer. On my computer they show up as red.
|
Re: Convex Hull Produces Black Image
Yes - when you do the image->Write() function, if you use a .jpg filename, you'll wind up with black images often (or always). If you use .bmp, you'll wind up with usable files/images. And the other person said .png which I haven't personally tried.
.bmp or .png Let us know this solved it. bob |
Re: Convex Hull Produces Black Image
Thanks for the help. We have successfully applied a convex hull and we are on our way to finishing vision tracking.
|
Re: Convex Hull Produces Black Image
I hadn't tried a BMP or PNG file, but rather just converted the image(changed the contrast and gamma) so that i could see the contrasting pieces and saved that as a JPG, so here's another example for ya, this results in a white on black image:
Code:
Image* thisImage = myBinaryImage->GetImaqImage(); |
| All times are GMT -5. The time now is 13:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi