Go to Post Do you guys mind if we postpone kick-off to around January 26 or so? We can still keep the ship date on February 20, if that isn't a problem. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-02-2012, 16:57
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
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
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2012, 18:20
ben_benavides ben_benavides is offline
Registered User
FRC #2085
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Vacaville, CA
Posts: 2
ben_benavides is an unknown quantity at this point
Smile 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.
Reply With Quote
  #3   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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi