Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Save ROIs with image using merge overlay

Hi,

 

I would like to save an I16 grayscale image with green ROIs on it. I have already browsed this forum where i found explanations about functions like Merge Overlay.

 

My program saves a copy of the original image with the ROI MERGED which gives this :

 

ScreenShot050.jpg 

But if I try to use the shorcut menu and saves this image, the green profile doesn't appear on it!!

 

If I use IMAQ Mask, i have the same problem given the fact that "If a pixel value is 0 in the Image Mask, the corresponding pixel in Image Dst is set to 0." SO the Mask has no effect with a green color...

 

The only way I found to save any ROI with the image is to use a dark color for the ROI :

ScreenShot051.jpg

 

Any Idea ?? I am sure that NI has a solution for this

 

 

0 Kudos
Message 1 of 10
(6,569 Views)

Just to be cleared i don't save a ROI merged with an image...it gives a totally white image with just the green profile on it!

 

The first image i shown comes from ROI to overlay.

0 Kudos
Message 2 of 10
(6,563 Views)

What is the purpose of the image with the merged overlay?

 

Do you want to keep the ROI with the image data or do you want to make an image for documentary purposes?

 

In the first case, but I am not sure, you have to invent your own image file format and/or make you own save routine.

In the second case you could use merge overlay and as a result you will get a RGB-image but it is 8 bits only. But anyway you cannot fully display or print 16 bit gray level images.

 

 

 

 

0 Kudos
Message 3 of 10
(6,550 Views)

I am trying to save the image with a green ROI on it for documentary purposes. 

 

I tried to follow this thread which is talking about this problem (the only difference is that the poster wanted to save an image with a text on it) : http://forums.ni.com/ni/board/message?board.id=170&thread.id=370112&view=by_date_ascending&page=1

 

I did exactly the same using ROI to overlay rather than Overlay text. But it only works for black or white ROIs (or texts). I would like to repeat this operation but with colored text or ROI.

 

Saving this is what i need :

ScreenShot052.jpg

0 Kudos
Message 4 of 10
(6,536 Views)

There might be a problem with the image conversion from 16 bit to 8 bit.

 

Please have a look at my example.

 

 If you need further information where the challenge is in your VI then you should post it.

 

Message 5 of 10
(6,532 Views)

I have Labview 8.0 (sorry i should have said it), so if u could upload your Vi in 8.0.

 

Here is a small VI that sums up what I am trying to do!

 

 

0 Kudos
Message 6 of 10
(6,525 Views)

 

Found this on a thread (dates back to 2001 so i do'nt know if it is still up to date) :

You can use the new Overlay tools in Vision 6. You can draw lines, points, rectangles, circles, etc. in any color you want.

The only problem with this method is that you can't store the resulting
image in a format that can be read by other programs, such as a bitmap. You can load and save it within LV, but not other software.

 

0 Kudos
Message 7 of 10
(6,497 Views)

ROI are not used in common photography. I don't know any common standard for ROI. Commercial or freeware programm can display PNG, TIFF and many other formats but no ROI. You can store the ROI information somewhere in the image information header with the TIFF or PNG format, but this information is meaningless for other programms. But you have to build a TIFF or PNG Reader and Writer on your own to handle this extra information.

 

With IMAQ Write File 2 VI you can store the overlay and other vision information in PNG header. But you cannot store ROI with the PNG image. A set of ROI is only a cluster. This can be stored in a binary file. So you end up with two files.

Message 8 of 10
(6,493 Views)

Thanks for pointing this out!

 

It would be very convenient to access ROIs for documentary purposes in the same time as the photography. I thought at first that I was just misusing Merge Overlay that I thought done for that purpose.

 

I tried to write a png file with its info but do you know how to access it?

 

0 Kudos
Message 9 of 10
(6,440 Views)

The Vision information stored in a PNG file is supposed to be fragile. If you read and store the image with another programm this information is lost. You can only read the Vision information using LabView. All image information is maintained. I have no clue about the format.

 

If you use the merge overlay function the ROI will become part of the picture (RGB-Picture). This picture can be processed with any other programm capable reading the file format (i.e. TIFF or PNG or JPG). You cannot restore the image information in the pixels where the ROI are drawn.

0 Kudos
Message 10 of 10
(6,436 Views)