08-26-2013 07:09 AM
Hi,
How to create Lookup table for each R,G and B planes in IMAQ ColorUserLookup VI?
Regards
Madhubalan
Solved! Go to Solution.
08-27-2013 01:00 AM
Hello,
depends on what you want to do. A cLUT (color lookup table) can be used to quickly alter the value of the pixel values based on your preference (the values are indexing the cLUT array).
Please see the attached code, where the 255 value on the red plane is replaced with 0 first using a cLUT and secondly with pixel by pixel access. The general basic idea of the lookup tables is reducing the calculation time.
Best regards,
K
08-27-2013 03:34 AM
Hi Klemen,
Suppose if i want to quantize the color in an image,i.e reduces the number of distinct colors used in an image.
If have attached the example of an image defore and after quantization.
Thank you
08-27-2013 10:21 AM - edited 08-27-2013 10:22 AM
Hi Madhubalan,
as fas as I know, there is no specialized function in NI Vision Module, that does exactly as you specified. You have to do it manually. It can be done on a by-pixel basis: get the color of each pixel, split into red, green, blue and replace their values as desired. In LabVIEW it is possible to define ranges in numeric case structures such as "0..32", "33..64" and so on. In the example below, all values between 0 and 32 will be replaced with the value 16.
Regards, Topper
09-04-2013 03:21 AM
09-05-2013 03:16 AM
Hi,
In the attached Vi file ,i could able to get the color of each pixel,in this how can i reduce the distinct color of the pixel and how can represent it in the ouput image.
Thank you
09-06-2013 03:15 AM - edited 09-06-2013 03:17 AM
Please see this thread, maybe it will help you:
http://forums.ni.com/t5/Machine-Vision/color-image-quantization/td-p/2545923
And here is your image reduced to 64 colors:
Best regards,
K
09-06-2013 04:33 AM
Hi Klemen,
It is working fine.
Thank you
09-16-2013 03:51 AM
09-17-2013 06:28 AM - edited 09-17-2013 06:29 AM
Hello,
Just count the number of instances of each element in the RGB vector (after the quantization). You can use the following vi: https://decibel.ni.com/content/docs/DOC-9801. Using the linked code, just check the size of the "count" output in the end.
Best regards,
K