10-03-2005 02:49 PM
10-05-2005 10:54 AM
10-05-2005 11:24 AM
If you have the Vision toolkit, see:
C:\Program Files\National Instruments\LabVIEW 7.1\examples\Vision\2. Functions\Grayscale Processing\BCG Lookup Example.vi
I have currently used this example as the basis for my code and use the IMAQ Image to Array fx to convert result in Vision Control to that in Intensity Graph.
Don't want to rely on IMAQ Vision for this project as I may want to create executables, and you cannot distribute IMAQ executables freely.
Sincerely,
Don
10-07-2005 11:07 AM
Hello Don,
The VI you want to emulate makes a call to the Vision DLL, which is closed source. It is possible to code in the same behavior; however, the code may be complicated. You can code your own transfer functions to modify all the pixel values of an image depending on the inputs to those functions. The brightness and contrast you may be able to easily approximate with simple functions. I have searched for examples for you, but was not able to find anything that did this without Vision. If I were you, I would start out trying to write simple transfer functions and testing to see if they are adequate, then improve them if you need to. Good luck and take care!
Regards,
Aaron B.
10-07-2005 03:44 PM
I think coding up the functions (brightness and contrast for sure, and gamma maybe) would not be difficult. I wonder if the approach should be to apply directly to the color palette or just transform the data at every image pixel using a function derived from the changes one makes to BCG. Just thought someone out there might have done this (and they probably have but are not lurking here).
Sincerely,
Don
10-08-2005 09:05 AM
The Quicktime library has Hue, Saturation, Brightness, Contrast, Sharpness, Black Level, White Level. I'm not sure if these could be adapted to the picture control. Possibly a reference to the source picture could be passed into the Quicktime vi's and converted back into a picture control. Look at the rotated thermometer on page 7 in this pdf file.
10-17-2005 07:51 AM
Hi Don,
I am a littel late on this one but here goes. In this example
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=C82CF170AD371651E034080020E74861
"Color Master Table" has some functionality that may help you.
Ben
10-17-2005 08:12 AM
I'm working on my own pure G version. Stay tuned. I have it working for brightness, contrast 'reduction' (if starting with fully-contrast expanded image which is what I usually do), and gamma for B&W. Now I want to be able to apply it to any color image as well within the framework of a color table generator I have been using for years with intensity graphs. I'm working this as time permits. Will check out the example you mention.
Thanks,
Don
10-17-2005 08:21 AM
Please keep us posted.
Color is one of my interests. I hope that example helps!
Ben
10-21-2005 10:58 AM
Take a look at this color model software I put together. (Don't concern yourself much with the basic programming at this point.). The color component generator subVI is borrowed from a LabVIEW example.
First look at test_color2.vi. If you adjust the sliders of the various controls, you will see how it works. You can see that for pure B&W images, brightness, contrast, and gamma (which I think I have coded correctly) are all fairly straightforward to modify.
Now look at test_color3.vi. Here we try to adjust BCG for color images using the color model shown here where current color component clusters are carried into the BCG event cases via shift registers. You can see that once color is introduced into the image, it becomes difficult to mix the colorizing with the BCG model. And this is pretty much where I am right now.
Would be interested in comments / suggestions.
Sincerely,
Don