|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
Last edited by simpsonboy77 : 11-02-2012 at 15:26. Reason: typo |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
Thanks for the help. We have successfully applied a convex hull and we are on our way to finishing vision tracking.
|
|
#4
|
||||
|
||||
|
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();
BCGOptions bcg;
bcg.brightness = 128.0f;
bcg.contrast = 89.0f;
bcg.gamma = 0.1f;
if (imaqBCGTransform(thisImage, thisImage, &bcg, NULL) == 0)
{
//error during save
printf("Error with imaqBCGTransform : %d\n", imaqGetLastError());
return ERROR;
}
if (imaqWriteFile(thisImage, "/BinaryImage.jpg", NULL) == 0)
{
//error during save
printf("Error saving image : %d\n", imaqGetLastError());
return ERROR;
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|