LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize Image without losing picture quality

I am trying to resize an image using the resize_image.vi attached which I found in the example vi's section. The program resizes the image just fine, but gives a big hit to the picture quality. Checked other programs available on the forums, no luck. I tried playing with it a little bit. Still could not quite figure out.

It would be a great help if I can find my way around.
0 Kudos
Message 1 of 13
(5,617 Views)
The scaling algorithm was not very good and has been inproved dramatically starting with LabVIEW 8.2. Time to upgrade.
 
Here's a comparison of an image scaled to 20%. As you can see, the LabVIEW 8.0 version is pretty ugly.
 


Message Edited by altenbach on 07-31-2008 09:03 PM
0 Kudos
Message 2 of 13
(5,602 Views)

You'll always lose some quality when resizing, because you're losing details. I assume your problem is only with things like what Altenbach showed, where you have a noticable difference.

In your search, did you come upon the VI in this thread? It's not designed to preserve quality at all, but it usually works reasonably well for pictures. You can also try searching the forum for 2D interpolation. You should find some things which might help.


___________________
Try to take over the world!
0 Kudos
Message 3 of 13
(5,592 Views)
Hi nevil,
             Check the attachments.Hope it helps!!!
0 Kudos
Message 4 of 13
(5,586 Views)
Download All
0 Kudos
Message 5 of 13
(5,585 Views)


muks wrote:
Check the attachments.Hope it helps!!!

It would help if you would add a few sentences. It is not clear at all what you are trying to say with your three images.
 
Are you suggesting nevil should buy a vision module?
0 Kudos
Message 6 of 13
(5,545 Views)
muks, I do not have NI vision so I could not relate to what you are suggesting here.
I guess the only option to resize images maintaing quality is to upgrade my LV to higher version
0 Kudos
Message 7 of 13
(5,527 Views)
"I guess the only option to resize images maintaing quality is to upgrade my LV to higher version."
 
I would not say that is the ONLY option but it is probably the most practicle solution. I was faced with a similar challenge in my 3d Railroad example . The issue reduces to having to play games with the number of pixels available on a screen and how the human eye will blend adjacent pixels. In the above code (not pretty, at all!) I had to resort to getting a histogram of colors and substituting new colors for the previous colors. Without that extra work, the whole thing looked PINK even though there wasn't a single pink pixel anywhere.
 
So the easy solution is to updagrade (purchase the work NI put into the new version).
 
If you can spring for the upgrade, well then you may want to look at my example for how I handled this issue.
 
Just trying to help,
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(5,519 Views)
What example are you talking about Ben?

I understand the point and respect the assistance these forums provie.
Let me see how my boss feels about the upgradeSmiley Indifferent


0 Kudos
Message 9 of 13
(5,507 Views)
Oops! Forgot to include the link. That sentance should have been;
 
"I was faced with a similar challenge in my 3d Railroad example . "
 
But first check about the upgrade. If my boss was asking to spec that work I'd insist on at least a week to get it working and efficient. The upgarde would be cheaper. Smiley Wink
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 13
(5,489 Views)