imagej MER basics - Page 12

Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 Next
Author Message
LWS


Posts: 3062

Reply: 221



PostPosted: July 19, 2012 2:29 PM 

Hort; I just followed your link to fram crater. I didn't know that the notebook included a mosaic viewer. Good stuff

Winston

hortonheardawho


Posts: 3465

Reply: 222



PostPosted: July 19, 2012 3:34 PM 

sol 88 ( Apr 3, 2004 ) L257 G+4xd of peculiar rock on the rim of Fram crater:

with location links.

Drat.

The ONLY images of the crater taken from the position 1413 were taken with the left camera. No 3D - and no images of the peculiar rock were taken previous or later.

Remember, it was sol 88 of a 90 sol mission!

LWS


Posts: 3062

Reply: 223



PostPosted: July 19, 2012 4:16 PM 

Hort

Thanks, Yes, I remember that it was sol 88 of a 90 sol mission.

Could you do the same processing with the track image, the earlier one that shows the rinds? An in depth look at that one might show some interesting objects, perhaps even more interesting than the yellow trails on the peculiar rocks above.

Winston

LWS


Posts: 3062

Reply: 224



PostPosted: July 20, 2012 10:20 AM 

Hort;

These are the rinds I was talking about above

They are from sol 88. Both were on the crater rim. I would be grateful if you would process them like your reply 222 above

Winston

hortonheardawho


Posts: 3465

Reply: 225



PostPosted: July 20, 2012 4:25 PM 

Winston, here ya' go:

I wonder what the "big boys" look at? Plain old vanilla false color? something I haven't imagined yet?

Nope. Won't ever know that.

LWS


Posts: 3062

Reply: 226



PostPosted: July 22, 2012 9:40 AM 

Hort;

Thanks! That is exactly what I was looking for.

Wonder if any of the Rock guys would like to comment on what the "rinds" in your #225 and my #224 really are. Do they think they are run of the mill evaporite pavement rock? impact melt? some other rock?

Winston

LWS


Posts: 3062

Reply: 227



PostPosted: July 22, 2012 10:17 PM 

Hort;

I tried the ratio colour formula. It worked beautifully.

Winston

hortonheardawho


Posts: 3465

Reply: 228



PostPosted: July 28, 2012 12:19 PM 

sol 3024 ( Jul 27, 2012 ) difference color navcam L0 image of Whim Creek:

Always looking for new ways to put images together.

See the Flickr comments for an explanation of how this image was created.

LWS


Posts: 3062

Reply: 229



PostPosted: July 29, 2012 6:47 AM 

Hort;

Your #228, Beautiful!!

Winston

hortonheardawho


Posts: 3465

Reply: 230



PostPosted: August 11, 2012 11:18 PM 

G+4xd macro for enhanced difference false color processing:

copy the text between the "cut" lines and paste into a text file "G+4xd.txt" and place in the imagej macro directory.

To use the macro, load an RGB image you wish to convert and run the macro.

---------------------------------------

NT=getTitle();
NT=substring(NT,0,lengthOf(NT)-4);
rename("rgb");
run("RGB Stack");
run("32-bit");
run("Next Slice [>]");
run("Duplicate...", "title=g");
imageCalculator("Subtract create 32-bit stack", "rgb","g");
//run("Image Calculator...", "image1=rgb operation=Subtract image2=g create 32-bit stack");
run("Multiply...", "value=4 stack");
imageCalculator("Add create 32-bit stack", "Result of rgb","g");
//run("Image Calculator...", "image1=[Result of rgb] operation=Add image2=g create 32-bit stack");
selectWindow("Result of rgb");
close();
selectWindow("g");
close();
selectWindow("Result of Result");
run("Stack to Images");
selectWindow("Red");
run("Brightness/Contrast...");
run("Enhance Contrast", "saturated=0.5");
run("16-bit");
selectWindow("Green");
resetMinAndMax();
run("Enhance Contrast", "saturated=0.5");
run("16-bit");
selectWindow("Blue");
resetMinAndMax();
run("Enhance Contrast", "saturated=0.5");
run("16-bit");
run("Images to Stack", "title=[]");
run("Stack to RGB");
selectWindow("Stack");
close();
selectWindow("rgb");
close();
rename(NT+"_G+4xd");

---------------------------------------

dx


Posts: 1661

Reply: 231



PostPosted: August 12, 2012 12:51 AM 

h>>>

Thank for your 230, I'll give it try. I notice you said RGB and not any other 'type' to start the process.

yt
dx

hortonheardawho


Posts: 3465

Reply: 232



PostPosted: August 25, 2012 7:09 AM 

I thought it would be a while ( like nine months from now ) before I had to create this macro: Raw Bayer image to RGB - which I have called "BayerRGB"

Copy and paste the code between the cut lines and save in a file BayerRGB.txt in the imagej macro directory.

To use, install the macro and then load a Bayer image raw file and then run the macro.

--------------------------------------------

rename("Bayer");
run("16-bit");
run("Multiply...", "stack value=255.000");
resetMinAndMax();
run("Duplicate...", "title=B00");
run("Scale...", "x=0.5 y=0.5 width=768 height=576 interpolation=None create title=Red");
selectWindow("B00");
close();
selectWindow("Bayer");
run("Duplicate...", "title=B10");
run("Translate...", "x=-1 y=0 interpolation=None");
run("Scale...", "x=0.5 y=0.5 width=768 height=576 interpolation=None create title=B10-1");
selectWindow("B10");
close();
selectWindow("Bayer");
run("Duplicate...", "title=B01");
run("Translate...", "x=0 y=-1 interpolation=None");
run("Scale...", "x=0.5 y=0.5 width=768 height=576 interpolation=None create title=B01-1");
selectWindow("B01");
close();
imageCalculator("Average create", "B10-1","B01-1");
//run("Image Calculator...", "image1=B10-1 operation=Average image2=B01-1 create");
rename("Green");
selectWindow("B10-1");
close();
selectWindow("B01-1");
close();
selectWindow("Bayer");
run("Duplicate...", "title=B11");
run("Translate...", "x=-1 y=-1 interpolation=None");
run("Scale...", "x=0.5 y=0.5 width=768 height=576 interpolation=None create title=Blue");
selectWindow("B11");
close();
selectWindow("Bayer");
close();
run("Images to Stack", "title=[]");
run("Stack to RGB");


--------------------------------------------

The reason I am doing this now is quite amusing and you may learn more in the reply 357 discussion of the topic Curious about Curiosity.

dx


Posts: 1661

Reply: 233



PostPosted: August 25, 2012 8:58 AM 

h>>>

I've been keeping low for the past while observing 'thumbnails'. Are these called Bayer??? What does that mean? Working in thumbnails is difficult to observe. [Really wanted Curiosity to send nice colored 4x6's [without any image editor work] for the grand-kids to look at! LMAO on that one Wink ]

I will install your 232 and give these 'thumbs' some order. [sure looks confusing jibe to this guy]

Many thanks for it, I'll post some pics if they are descent.

yt
dx

hortonheardawho


Posts: 3465

Reply: 234



PostPosted: August 25, 2012 11:06 AM 

dx, here is a Wikipedia description of Bayer Filter.

Basically it is a permanent filter grid over the imaging CCD. The output from the CCD is - after all - an array of voltages that represent different brightness values.

The thumbnails are most definitely NOT Bayer images.

Here and here are a couple of "raw" Bayer images posted in the last few minutes. Act quickly and be the first in the world to see the color!

dx


Posts: 1661

Reply: 235



PostPosted: August 25, 2012 12:28 PM 

h>>>

Here they are without touch-ups. I could NEVER get this far without your help...many, many thanks. I just loved the way that formula flashed out all the B/W images and then out popped the colored one...at the end...way to much for me to analyze.
Please indicate the site for these 'Bayer' images.
All the best and thanks again.

yt
dx

hortonheardawho


Posts: 3465

Reply: 236



PostPosted: August 25, 2012 7:27 PM 

Thanks dx for giving the Bayer-RGB macro a try.

As you point out. it's quite amazing to see the color pop out of the strange B&W images.

Er, these "raw" images are from the official MSL Raw images site.

I wonder if the "plan" ( Muaahhhahhhaaa! ) is to "lock out" 99% of the tiny hand-full of people actually interested enough in the rover data to download the "raw" images? Why? Why NASA hast thou foresaken us?

Or maybe this is only a "checkout" of the cameras. GOK.

BTW, these images are part of a tall, vertical "natural" color 3D panorama from Mount Sharp to Curiosity's "bumper":

There are still some pieces missing.

And the RIGHT Mastcam links are STILL missing from the MSL Raw image page. I have e-mailed the site THREE times now about the missing link and the error has not been fixed and I have not received a reply ( not even a robo "Thank you for your call. Your call is important to us so please listen to this pleasant interlude of elevator music while we lose your connection." ( I hate robots - especially those masking as people - and I can't stand people who pretend they are robots) )

Maybe some tiny mention of these images will be made during the next televised Curiosity news conference on Aug 27, 5PM EDT. They will not mention the green - at - all.

Ah well, gott'a keep the bastards honest.

jj


Posts: xxx

Reply: 237



PostPosted: August 25, 2012 8:26 PM 

Hort;
Big thanks for the Macro as a very quick fix to get colour out from these images in Imagej! However, I think the algorithm you use somehow leaves a grid artefact. I think it is because how you scale down to 50% and not really interpolating to the correct positions. I tried to fix it by making the calculations properly with interpolations in the original image size) but I had to give up for now due to lack of time and Imagej skills...

About the missing RIGHT mastcam:
I noted several days ago that there is a bug in their raw image site directory. If you sort the images by "Sol" you get both left and right. If you do it by instrument, the right mastcam are missing. So if you sort by sol you will find the missing pictures. Anyway, hopefully they fix the bug.

jj

hortonheardawho


Posts: 3465

Reply: 238



PostPosted: August 25, 2012 10:09 PM 

jj, glad you found the Bayer RGB macro useful.

I'm also happy you noticed that:

1) the resulting color images are 1/2 the size of the "raw" Bayer image and
2) part of the "grid" remains in the final color image.

The first is due to the fact that although the Mastcam CCD is in fact 1600x1200 pixels 1/4 of the pixels are covered by Red filters, 1/4 are covered by Blue filters, 1/4 by Green 1 filters and 1/4 by Green 2 filters - all in a regular grid:

R G1 R G1 R G1 R G1 R G1 ...
G2 B G2 B G2 B G2 B G2 B ...
R G1 R G1 R G1 R G1 R G1 ...
G2 B G2 B G2 B G2 B G2 B ...
R G1 R G1 R G1 R G1 R G1 ...
G2 B G2 B G2 B G2 B G2 B ...
R G1 R G1 R G1 R G1 R G1 ...
G2 B G2 B G2 B G2 B G2 B ...

To get pixel of color you have to combine 4 adjacent pixels - ie, R,(G1+G2)/2, B. You can create a more complex combination and recover a full size color picture - but I wanted to produce a quick and dirty color picture to show what was going on - which brings us to point 2).

Because the "raw" images on the MSL site are JPG format there is by the nature of JPG compression a blurring of the original pixels together. There is no way around it. Without a lossless format of the original data there will be "ghosting". A full size image would only make the problem worse.

Lossless Bayer "Raw" data with a more complex color combination pattern should be spectacular.

I'll leave it to the "big boys" to create them.

hortonheardawho


Posts: 3465

Reply: 239



PostPosted: August 26, 2012 12:27 PM 


Test of new Bayer-RGB macro:


The Flickr comment contains the new macro code.

This version uses a bi-linear interpolation to create "full-size" color images.

I included the test montage to illustrate that the "grid" problem in the MSL images is NOT a bug in the macro - but results from the yukky JPGs.

Here is the Bayer PNG file you can use to test the new macro:

jj


Posts: xxx

Reply: 240



PostPosted: August 28, 2012 3:47 PM 

Thanks! Works great.
(A very minor suggestion; after scaling up with a factor of 2, shouldn't you "translate" back to the original pixel position for the green(s) and blue. Actually should average only every second pixel when merging the greens. This is where I got stuck/gave up, but sure there is some way to do it.But basically should be better to shift them before averaging the two greens in any case otherwise there is an unnecessary blurring. )

And yes, you are certainly correct that the artefacts on the JPL pictures seem to be due to some "interference pattern" between the RGBG "coding" and the jpeg rather than any error in the processing.
(Obviously, if they do not release lossless data they should at least jpg the Bayer-colorized image as opposed to raw image.)

Again great thanks for the useful macros and imagej tutorial!


jj

Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 Next


Join the conversation:















Very Happy Smile Sad Surprised
Shocked Confused Cool Laughing
Mad Razz Embarassed Crying or Very Sad
Evil or Very Mad Twisted Evil Rolling Eyes Wink
Powered by MTSmileys