loading
 
saving image
Bob from Australia  [4 posts]
10 year
How do i setup saving an image that has the center of gravity displayed on it?

I am scanning images with an object and if it is found i want that image to be saved to a certain folder any help is greatly appreciated.
Steven Gentner from United States  [1446 posts] 10 year
Anthony,

You would use the Write Image module. The trick is to ensure that the graphics are also saved along with the image. You can either uncheck the "Write immediately" checkbox in the Write images module or uncheck the "Display as annotation" in the COG module. Either way the graphics should then be written out as part of the image.

The reason for these checkboxes is to allow the image to be processed without having the graphics drawn by modules interfering with the actual raw image.

STeven.
Bob from Australia  [4 posts] 10 year
Thanks for that but what i want to do is only save the images with the graphics overlayed and not the images with no graphics.

So when the target is found and the graphics are overlayed on the screen these images are saved to a folder but not any of the other images without the graphics is this possible. thanks
Steven Gentner from United States  [1446 posts] 10 year
Anthony,

Try the attached. It will save images and beep when enough movement is present.

In your case, the if statement module would use the COG_BOX_SIZE or something like that to determine when something is actually seen. Normally a size of 25 (as in the COG box is at least 25 pixels big) should work.

STeven.

program.robo
Bob from Australia  [4 posts] 10 year
Thanks for your help, works great just what i needed
Nana111 from United States  [3 posts] 10 year
HI THERE
If you want to save an image ,you can refer to this method:
public static void SaveImageFile(REImage image, string filePath);
public static void SaveImageFile(REImage image, string filePath, BaseEncoder enc);
Or you can just take a look at this site:
http://www.rasteredge.com/how-to/csharp-imaging/imaging-saving-printing/

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index