Help - Search - Members - Calendar
Full Version: Dust Devil Image Enhancement
Unmanned Spaceflight.com > Mars & Missions > Past and Future > MER > Tech, General and Imagery
wyogold
OK I posted questions in the live dust devil topic and didn't get much response.
I have now done some tries at enhancements but I am not a Photoshop wizard.
I am getting close to the enhancements that JPL does but something is missing.
My images turn out grainy when I tweak the contrast. Here is the process.

1. select 2 images that are the same view, size and filter. (preferably one with dd and one without.)

2. invert (negative) one of the images.

3. select all on the inverted image

4. paste to the other non inverted image

5. decrease the opacity of the inverted image layer to 50%

6. merge visible

7. increase contrast (this is where things are going not quite right)

you now have an image that is only what has changed between images. (like dust devils or such)

Now you can take the image and place it back over the original to enhance the dust devil.

I would really appreciate it if somebody more adept at modifying images could tell me what I'm doing wrong and why my images don't look like jpl's. thanks

Wish I had more time to do this with all the frames and build a movie.
My earth rocks are getting in the way of my mars rocks *sigh*

Here are my attempts. One raw and another running it through a filter or two before combinding with the original.







scott
Pertinax
Just a quick thought: I suspect that when using the stretched JPGs we have as 'raw' data, that JPG artifacts will accumulate in your composit image, making it look grainer than expected.

-- Pertinax
djellison
They also lack to flatfield/dark frame processing that renders the properly RAD'd files much smoother and 'better' to look at

Doug
wyogold
QUOTE (djellison @ May 10 2005, 02:17 PM)
They also lack to flatfield/dark frame processing that renders the properly RAD'd files much smoother and 'better' to look at

Doug
*


oh ya.... forgot i'm working with the "raw" files.

thanks

scott
Charlie
The jpeg noise is an issue, but I like this method:

1. In the image with no DD, duplicate the bg layer then create a third layer over those with a copy of the image with the DD.

2. Change the composite method on the top layer (the DD layer) to "difference".

3. Merge it with middle layer below it.

4. On that newly merged layer perform a "auto-levels"

5. Change the composite method on that merged layer to "screen"

Charlie
jaredGalen
I was hoping MichaelT might be able to pop in here and maybe offer a few pointers on his great method for DD enhancement.
I have been trying to implement it in Java and am having a little bit of success but am still having trouble in attaining the amazing results that we have seen in the LDD thread. (I need a little project to work on on the side laugh.gif )
I think it mainly has to do with JPG artifacts but I there are other issues.
Here is my attempt from using MichaelT's algorithm


Here's the original enhanced version that MichaelT did


I can't seem to get rid of those silly artifacts at either side and the top.

I was a little confused by a few lines regarding the generation of the final images.
Are there 3 three ways to create them with different blur and sharpening methods applied? That's what I assumed and implemented

CODE
(CONVOL((REFORM(DIF_IMAGES[I, *, *]) + BASE_IMAGE) > 0 < 255, F) + 0.75 * (BASE_IMAGE - CONVOL(BASE_IMAGE, F))) > 0 < 255
for creating my final image.

Here are the steps I take:
i)Load images - perform gaussian blur on each with SD=1.2
(If I leave the blurring step out here the final result is terrible)

ii)Calculate base image using median value of loaded images

iii)Create difference image using originalPixel-basePixel (Should I scale to 0-255 - result shown has no scaling performed at this stage)

iv)Add the base image and the difference image - scale to 0-255

v)Subtract gaussianBlurred base-image from base-image and multiply resultant pixel value by .75

vi)Add images from iv) and v) together and scale to 0-255

And the result is the first image shown
Does this sound right?
Image maipulation is kinda new to me so I might be making some noob assumptions and mistakes, sorry 'bout that smile.gif
jG
MichaelT
Yes, I'm around smile.gif

These artifacts could be due to a data type problem. You have to ensure that you use floating point or double precision values during all of your operations. Otherwise negative values could lead to some unexpected effects. I had the same problem at first, but got rid of it that way. You should only convert the image to integer or binary type right before you save it.
As I don't do Java-programming I'm not shure if that is an issue there at all.
Another step that could probably cause such artifacts is the scaling to 0-255. You should check that as well. One way would be to print the max and min values of the data arrays after each step of your calculations.
QUOTE (jaredGalen @ Jun 10 2005, 01:39 PM)
I was a little confused by a few lines regarding the generation of the final images.
Are there 3 three ways to create them with different blur and sharpening methods applied? That's what I assumed and implemented

These three lines basically reflect different development stages of my program. First I did no blurring at all, then I did, but did not add additional sharpening, before I got to the final equation. That's all smile.gif

Your procedure is mainly correct. But I have a few comments. Firstly, in step (iii), you must, in deed, not scale the difference image to 0-255 as negative values are required to darken areas that are darker than the median image. Secondly, in step (iv) I do gaussian blurring as well. That will probably make obsolete the blurring you perform in step (i).

Recently, I have modified my program a little. You may have noticed that some of spirit's images are quite dark. To circumvent this I added a few lines. First I calculate the mean pixel value (a variable called MBI) of the lower half of the image. If that value is lower than 64 I do the following:
CODE
IF MBI LT 64 THEN BASE_IMAGE2 = BASE_IMAGE * (256.0 - MBI) / 256.0 + (64.0 - MBI) ELSE BASE_IMAGE2 = BASE_IMAGE

This BASE_IMAGE2 substitutes BASE_IMAGE in step (iv) and the average brightness of the lower half of the image is approx. 64 afterwards. Then, it is easier to see details in the dark areas of the final image. Though, on the cost of a little bit of the dynamic range of the image.

Michael
jaredGalen
Thanks for taking the time to reply.
Straight away I can see one big problem, all the intermediate manipulations I do end up being
converted to Integer values, so that's something I'm gonna have to go round. As far as I know,
the structures I use to manipulate the images in Java only allow integer values for the pixels.

Haven't a lot of experience in Java image processing so if anyone reading knows of something to the contrary, you can let me know biggrin.gif

Well, that's something to keep me occupied for a while.

Thanks again for replying and for the pointers.
jaredGalen
Well, here's my latest attempt.

Much happier with this but I'm still not doing performing all the steps, this is just
the original image added to the base\median image.
I haven't incorporated this part in yet.
CODE
0.75 * (BASE_IMAGE - CONVOL(BASE_IMAGE, F))) > 0 < 255


Having a little trouble with doing the convolution on the intermediate data.

Getting there though. tongue.gif
jaredGalen
Implemented that bit now, made no difference at all. Must be something up somewhere dry.gif
jaredGalen
I have put the JAVA implementation of MichaelT algorithm up for download for people to use:

http://jaredgalen.blogspot.com/

Edit: Oh, there are a few images included in the input folder so you can see the results straight away. and to see if it works.
jaredGalen
Oh, and you can set the Enhancement factor to anything you want to.
That's another reason that I did it too....
wyogold
QUOTE (jaredGalen @ Jun 18 2005, 08:50 AM)
Oh, and you can set the Enhancement factor to anything you want to.
That's another reason that I did it too....
*


wow sweet

scott
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.