View Single Post
  #7   Spotlight this post!  
Unread 12-02-2012, 12:08
GrimmReaper's Avatar
GrimmReaper GrimmReaper is offline
Registered User
FRC #2046 (Bear Metal)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Maple Valley, WA
Posts: 24
GrimmReaper is on a distinguished road
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;
		}
- Jon
Reply With Quote