12-16-2010 01:22 AM
Hi All,
How can I generate or draw CIE1931 chromaticity diagram in LabView ?
I've checked the post below but it still can not generate the CIE1931 chromaticity diagram in LabView.
Does anyone know how to implement it ?
Thanks for you guys' help.
taky1119
12-21-2010 12:38 PM - edited 12-21-2010 12:47 PM
Here is a less-then-perfect solution: Set the background plot area of a XY graph to a CIE 1931picture (Wikipedia has nice CIE image).
Scale/size everything appropriately to line up the coordinates. The biggest drawback (besides the fact that it is sort of a hack-job) is that you cannot easily resize the thing. The only way I found to do this is to resize the image in some image software (GIMP is great!) and load the appropriately sized image into the background at run-time. Also, you cannot use the graph zoom functions because the image is not smart enough to zoom too.
I verified my image alignment using the Black Body curve.
I have attached an example of this in LV2010 and 8.2 (I cannot test 8.2 so hopefully it works if you need it).
Otherwise you have to create your own bitmap-type-thing using RGB or some other color systems. This gets tricky because among other things, I think it matters what monitor this will be displayed. The process would be something like this:
1) Convert CIE 1931 to tristimulus XYZ (I have the xy to XYZ function if you need it)
2) Somehow null the values that don't make sense (those outside the "horseshoe")
3) Apply a conversion matrix to get RGB (This is where the specific display/reference comes in)
4) Create the background to your graph/display/picture/etc.
For more information on this route I found: http://cs.haifa.ac.il/hagit/courses/ist/Lectures/Demos/ColorApplet2/t_convert.html.
There may be better ways. I'm interested if anybody else weighs in!
Cheers,
-Jolt
Edit: I just realized that the images I used are only in the LV2010 folder. If you load the 8.2 example you will need to move these images into that folder.
Also, the formats for the graph plots didn't save. The second plot ("plot 1") is best viewed as big points (X), without lines.