LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BCG Brightness Contrast Gamma - Looking for BCG function returning color table / lookup table coded in pure G and applicable to Intensity Graph or Picture Control

Looking for BCG function returning color table / lookup table coded in pure G and applicable to 8-bit Intensity Graph or Picture Control. Do not want to use IMAQ Vision is this particular application.  Any help is appreciated.

Sincerely,

Don
0 Kudos
Message 1 of 11
(4,973 Views)
Hello,
 
Can you describe what you are looking for more specifically.  I won't make you any promises but perhaps I can help you code what you would like for yourself, in the event no one posts the solution for you.
 
Thanks, and I look forward to your reply!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 11
(4,964 Views)

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

0 Kudos
Message 3 of 11
(4,961 Views)

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.

0 Kudos
Message 4 of 11
(4,944 Views)

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

0 Kudos
Message 5 of 11
(4,934 Views)

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.

 

0 Kudos
Message 6 of 11
(4,923 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 11
(4,904 Views)

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 

0 Kudos
Message 8 of 11
(4,901 Views)

Please keep us posted.

Color is one of my interests. I hope that example helps!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 11
(4,900 Views)

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

0 Kudos
Message 10 of 11
(4,866 Views)