From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Image quantization using dotNET in LabView (Octree quantization)

Klemen
Active Participant

Hello,

I am attaching a VI that performs Octree image quantization using the dotNET functionalities in LabView. This was made possible by (thanks 😞

1. Image quantization library found here: http://codebetter.com/brendantompkins/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness/

2. bitmap handle to 2D picture convert VI found here: http://fabiantoepper.de/hbitmap-handle-mit-labview-lesen/

Currently, the only big problem with the attched code is that you must load the image from file. You can also use the image method to pass in the bitmap handle, but I do not have the knowledge to do this and am not planning to delve depper into this in the near future (the part, where the bitmap is passed as a bitmap handle). So please, if anyone makes any progress (with any part of the code) leave a comment here, since I am also interested in this.

In the experiments (the results are shown below) I am using .jpg images:

max_colors: 128

128.jpg

max_colors: 64

64.jpg

max_colors: 32

32.jpg

max_colors: 16

16.jpg

The attached VI is saved for LV2010. Please tell me if it does not work for you.

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."