Jump to content
Sign in to follow this  
sibarrick

Normalising some 16bit data

Recommended Posts

Has anyone here with more compositing/signal processing experience got any ideas about how to solve this....

I have a bunch of grey scale 16bit image data that comes from a CT scanner. The problem is that the brightness varies from frame to frame and I need it to be consistent. I can probably fix it manually but its going to be very time consumming.

I've tried using the equalize cop but it doesn't do the job I need.

If I look at the histogram for each frame they pretty much have the same envelope with 3 peaks, one near 0, and the other 2 about mid way up. Basically what I'm looking for is a automatic way of aligning those peaks across all frames (at least I think that is what I want)

Anyone got any clever ideas about how to achieve that?

Share this post


Link to post
Share on other sites

Just to be boring, I have got to ask - have you tried any of the Flame or AE (maybe even Shake or Nuke) de-flicker plugins out there? (Evidently your data can be visualized directly as images, right?)

Share this post


Link to post
Share on other sites

It's all 16 bit pngs. CT data looks a bit like an xray I guess. Bone shows up white and softer tissues grey, with empty space black, hence the 3 peaks in the data.

I have access to AE but nothing else. Can't remember seeing a normalising function in there, but then I know next to nothing about compositing. I'll take a look.

Share this post


Link to post
Share on other sites

you could use the Equalize compositing node...

from the help:

operation >

Equalize Luminance Across Frames - The global luminance is computed for several frames around the current frame. The current frame

Share this post


Link to post
Share on other sites

As I say, I tried that first but it doesn't seem to do what I want. I've tried all the settings but I don't get the sort of normalisation I need. When I look at the histograms the peaks still move around randomly from frame to frame.

Share this post


Link to post
Share on other sites

Actually..... cranking the frames before and after right up seems to be working.... maybe I should have played with it more.

Ah.... now I see what is going on. It works for most of the data, but some of it includes some horrible spikes. Which throws out the equalize cop. maybe I can remove those first....

Edited by sibarrick

Share this post


Link to post
Share on other sites
Actually..... cranking the frames before and after right up seems to be working.... maybe I should have played with it more.

I wonder if it might help or hinder to break the image into luminance bands, running and reassembling might help? Or perhaps performing the correct within a gamma-corrected space?

Can the node correct an image based on reference images? Then perhaps you can play about and preprocess the inputs (say, pass filters or blurs, etc) and correct the originals.

I am more questions than answers today.. sorry..

Share this post


Link to post
Share on other sites

oooppss...sorry simon...read too quickly....

hmmm...could you play around with clamping the values?

Share this post


Link to post
Share on other sites

I'm kinda trying everything you're suggesting, and coming to the same conclusions.

If I remove the high end stuff that is burned in then equalize what is left over a fairly broad range of frames that works quite well, unfortunately trying to blend the removed stuff back in is proving a problem at the moment.

As Jason says I need a way to make the equalize cop just see the despiked stuff but apply the result to the whole frame, masking doesn't seem to be working for this but I think I need to play with it some more. Its close....

Edited by sibarrick

Share this post


Link to post
Share on other sites
I'm kinda trying everything you're suggesting, and coming to the same conclusions.

If I remove the high end stuff that is burned in then equalize what is left over a fairly broad range of frames that works quite well, unfortunately trying to blend the removed stuff back in is proving a problem at the moment.

As Jason says I need a way to make the equalize cop just see the despiked stuff but apply the result to the whole frame, masking doesn't seem to be working for this but I think I need to play with it some more. Its close....

What if you preprocessed, removing the spikes before equalizing? But, I guess detection of those spikes is tricky?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×