Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image not displayed correctly in image control at small zoom level

Solved!
Go to solution

Hi Dan,

I have a simplified VI that reproduces the issue.  How do I get this & the image to you?  The VI is small but the image is ~ 400MB.

 

Thanks,

Jonathan-LV

0 Kudos
Message 11 of 18
(1,474 Views)

My guess is that the max scaling factor is 1/64x, since that is between the two scaling factors you tested and it is a nice power of 2.  Personally, I find that to be a reasonable limit, not a bug.  I do think the zoom setting should stop at that value instead of displaying grayscale, though.

 

I would suggest creating a downsampled image for selecting the ROI, then doing the analysis on the original image.  All you should need to do is multiply the coordinates of the ROI by whatever factor you downsampled your image by.  For example, if you downsample your image by 4x, multiply the ROI coordinates by 4 to get the same coordinates in your original image.

 

If you need the full zoom range, you could have a switch that toggles between the high res and low res versions.  This would give you both the ability to zoom in and select a very precise region, or zoom out and select a very large region.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 12 of 18
(1,470 Views)

Hi Bruce,

Thanks for your post.  I tested your theory about the max scaling factor being 1/64x and I can zoom in to a greater zoom level than this on other images.  I was hoping you were right because then I could programatically set 1/64 as the max zoom factor...

 

Your workaround suggestion is also good and I think this is where Dan was heading as well.  I want to hear back from Dan first so that I know what the root of the problem is.  Then I can choose the correct workaround; if I need a workaround at all.  I deal with large images in my applications.  This workaround would result in additional memory allocation.  I I would like to avoid this if at all possible.

 

Hi Dan,

I still need to know how to get this large image to you.  I have the LV code ready for you also.

 

Thanks,

Jonathan-LV

0 Kudos
Message 13 of 18
(1,452 Views)

Hi Jonathan,

 

Sorry about the delay. The easiest way to proceed from here would be for you to post the code that you're working with here, as well as the dimensions and size of the image that you're working with. I see that you're working with a 24-bit image that's roughly 4200x37000 pixels. Is that correct? I should be able to create an image of this type and dimensions here; if the behavior does not reproduce, then we can work on getting your large image. You mentioned that you can zoom in closer on other images - what are the differences between those images and this one? Is the difference in pixel representation or in actual image dimensions?

 

Also, so you're aware, it may be that even after reproducing the behavior the smaller ROI workaround will be the only functional solution. 

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 14 of 18
(1,441 Views)

Hi Dan,

The image is 4281x37118 24 bit Tiff.  I have attached the VI.

 

I'll look into what the differences are between the images.  Please let me know if you are not able to reproduce this issue.  There's got to be a reason why I am seeing this behavior.

 

Thanks,

Jonathan-LV

0 Kudos
Message 15 of 18
(1,426 Views)

Hi Jonathan,

 

Thanks for the VI. I have not been able to reproduce the behavior yet, but I will keep trying. Please let me know when you've determined the differences in the types of images you can and can't zoom out on.

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 16 of 18
(1,417 Views)
Solution
Accepted by topic author Jonathan-LV

Hi Jonathan,

 

I wanted to let you know that I was able to reproduce the behavior you were seeing. R&D is aware of the issue now - I have filed CAR 340261 on the subject. For now, the workaround that we've discussed earlier where you resize the image, generate an ROI, and then scale ROI to your corresponding image is going to be your best course of approach. There is a (non-comprehensive) list of some of the bug fixes put out in each version of the Vision Development Module, which you can check for that CAR number as new releases come out. Here's the example for VDM 2011. 

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 17 of 18
(1,397 Views)

Hi Dan,

Thanks for the confirmation of the defect.

 

Jonathan-LV

0 Kudos
Message 18 of 18
(1,394 Views)