ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Histogram of raw, unadjusted data
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tedfine

10 Posts

Posted - Nov 06 2017 :  18:01:24  Show Profile  Reply
My application involves image analysis of low light images taken with DSLRs.

I want to show my users three histograms (R, G, and B) so they can see if they have sufficient exposure levels (> ~40k in our application) but not larger than ~55k where non-linearity may occur, AFAIK.

I'm having trouble with bit depth and automatic adjustments made by ImageEn.

I don't want ImageEn to adjust exposure levels. In other words, if an image is under-exposed, I don't want the pixels values stretched. (Does IsNativePixelFormat := TRUE turn off that function?)

And, I'd like to use THistogrambox if I can. THistogrambox only works with ie24RGB images though.

I suspect I'm going about it all wrong.

My latest attempt:

1. Read in Native Pixel format using TIEBitmap.Read with IsNativePixelFormat := TRUE
2. Divide all pixels by 255 (to scale them down from 0..65k to 0..255)
3. bmp.PixelFormat := tiepixelformat.ie24RGB;
4. Update the histogram with the bmp. (and turn off the x-axis label in the histogram, so that "255" isn't shown as the max x-value. Replace it with a nearby TLabel that says "64k"

But in step 2, on the line below the compiler says that Left side can not be assigned to:

bmp.Pixels_ie48RGB[Column, Row].B := bmp.Pixels_ie48RGB[Column, Row].B / 255;

Plus, the above procedure seems rather convoluted. I'm not sure it will work, or if converting the image to ie24RGB will trigger some sort of other unwanted changes to the data. I'm hoping there's an easier way to accomplish my goal.

Along the way, I've unintentionally configured the engine to not apply any corrections, which results in very noisy images. I'm not sure now how I did that, but I *think* that's the mode I want.

Clearly, there's a lot I don't understand about the engine and raw images.

Any suggestions?





xequte

38176 Posts

Posted - Nov 07 2017 :  18:55:59  Show Profile  Reply
Hi

Rather than modidying the bitmap in some unexpected way, create a TIEHistogram with your values scaled 0.255.

Then pass that histogram to THistogramBox using UpdateFromHistogram.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: