Alien Anomalies

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Working together on Density Slicing black & white photos


Teaching the truth

Status: Offline
Posts: 1921
Date:
RE: Working together on Density Slicing black & white photos
Permalink  
 


I am posting this here as well so that any problems can be reported here, rather than the sticky thread.

I have done a bit of tweaking and added a list of the results to the search program. On the results screen, if you click on the black square with the large white spot in the middle you will be taken to a screen which lists the photo ids. You will have to highlight and copy these yourself to an editor or paste into a forum post or whatever. I have only documented this here on this forum so far and it will probably remain a 'hidden feature'.

Also, there is a more interactive photo colouriser which uses javascript. You input the black and white photo URL and the next screen shows the palettes. You click on each of the different palettes to 'colourise' your photo in real time (although it takes a few seconds to do it!). When you are happy with the chosen palette, you click on the palette-applied photo on the left and it will give you the full size image colourised to that palette.
You will need to right-click and save-as to save your newly colourised photo. The original URL is given at the top so you can copy the photo ID if you want.

__________________


 



Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Ok, thats good. I have a few more ideas for this project - such as showing some examples and maybe help in choosing a palette to use.

Anyone have any more idea, please chip in....

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

It's working for me!


__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Ok, well it MAY be OK now. I hope so. These things are never as easy as they seem. Particularly when you have to account for all browsers and versions of browsers and different operating systems, etc. (thats my excuse anyway smile.gif )

Sorry for the bugs, I'll get it right eventually.

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

I tried three times and got this message:

3.  "Loading photo - please wait" =

then does nothing else.




__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Oops - fell at the first hurdle as they say in racing....
Should be OK now I have fixed that bug.

I have tried it a couple of times and it seems OK. Give it another go please. Thanks.

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

qmantoo, when I clicked on the Create New Pallette selection from the main menu I got this message:

"Warning: require_once(incl/get_url.php) [function.require-once]: failed to open stream: No such file or directory in /home/weifan/public_html/pelicanbill/subdomains/mars/httpdocs/palette_createinput.php on line 26

Fatal error: require_once() [function.require]: Failed opening required 'incl/get_url.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/weifan/public_html/pelicanbill/subdomains/mars/httpdocs/palette_createinput.php on line 26"



__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Palettes are done - subject to testing. Please have a go if you like and tell me any problems.
I have added the two programs to the main home page (click the link in my signature).

Please use sample number 5 (the centre area) and do NOT use very large > 1Mb or landscape (panorama) colour photos to create a palette from.


__________________


 



Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

I thank you all for your encouragement and input to the process of development. I hope that it will be useful where the other filter pictures are not available and it will be one more poke in the eye for NASA who obviously feel that we do not deserve to know the truth.

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

qmantoo, I think it's terrific!!!!!


Spirit sol 527, using qmantoo's coloration program, adjust contrast, adjust saturation, make it rotate, voila:



http://marsrovers.jpl.nasa.gov/gallery/all/2/p/527/2P173156766EFFACA0P2440R1M1.JPG





__________________


Dedicated to the truth

Status: Offline
Posts: 1217
Date:
Permalink  
 

gmantoo, I understand the difficulty now that you have explained it so clearly.

I did not realise the entry included the sol, so no worries I will just go back and look up the page and proceed in the normal manner.

Thanks for trying to help smile

__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

If I understand you correctly, you want to enter into the input box only "2P296908584EFFB1DQP2290L2M2.JPG" using the example below?

I think they all have sol numbers as part of the url so it would have to be the part up to the sol number and you would then have to find the sol number or copy the sol number from the original url.

I assume you mean this
http://marsrovers.jpl.nasa.gov/gallery/all/2/p/1921/2P296908584EFFB1DQP2290L2M2.JPG
<----------------------------------------------------->

In this case the 1921 is the sol number and is a directory where they keep all the images for that sol.

so, what do you want me to do now?
Of course I can do it, but you will have to enter the sol and the photograph number.

__________________


 



Dedicated to the truth

Status: Offline
Posts: 1217
Date:
Permalink  
 

gmantoo, it works like a dream and although the coulours are light I can see the tampering areas much more clearly.

Can I ask you a question, I get my images directly from the NASA Rover Raw images and when it saves it only gives me an image number. I am sure that most of us are working from this site. Can you insert a NASA page default in where we can attach the image number on the file at the end of the line. The reason is I keep on having to go back to find the pages when I want to use the programmes and it is timje consuming if there is a way around it ? This is for this programme and the Image Info programme only if at all possible ?

__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

OK, still a bit of tarting up to do, but I think it works and is not too slow on large-ish pictures.
Give it a whirl and let me know what you need. At the moment there are only 3 palettes and they do not look so good on the large photos but I am still working on making the create palette program look presentable. If you need a new palette in the meantime, send me the link to the colour picture and I will do it for you.

__________________


 



Dedicated to the truth

Status: Offline
Posts: 1217
Date:
Permalink  
 

marsrocks, have we worked that image yet ? It has two glaring anomalies....if not on site yet can you post it in a seperate thread with an image ref for us to have a look at please ?

gmantoo, I was also thinking of a crop size image to work on.

Can we set the colour definition to make the rocks the colour of the soil in the image below and the soil the colour of the rocks ? I have a hunch that would create an interesting image....

__________________


Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

qmantoo, it looks like you're making good progress.

You can just cut a section of a Mars image to the size you want.









On color, it seems Mars colors fit well into pastels; blue and beige seem to be the two primary colors in the image above.






__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Size is an issue too. When I colourize the b & w photograph, it makes it 5x bigger!

B & w mars picture is 234K bytes

coloured mars picture is 1364K bytes

If we can get it right, it should be a goood technique.

__________________


 



Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

are there any 'little' mars pictures? I thought they were all fairly large. My gopher is only 16K.
I have to sort out creating and saving a palette from a colour photograph and then I will try it on a proper mars picture.
Actually, I am surprised no-one else has done this kind of thing. They must have somewhere.... I obviously like re-inventing the wheel for my own enjoyment.

__________________


 



Dedicated to the truth

Status: Offline
Posts: 1217
Date:
Permalink  
 

Looking good ! Can we try on a little Mars picture yet ?

__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

After a few moments of pulling out my hair, I am making progress - see here
There are still a few issues to be ironed out but it works quite well on this small picture.
I dont know how long it will take to actually process each one, so it might still be impractical for real megabytes worth of photograph.
greypic_colour.jpg

The black dots are greyscale palette items not filled from the colour sample area. I am thinking of using the nearest greyscale which is not blank (???)

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

qmantoo - go to this page from my website and scroll down to the bottom for more links - just click on the picture or underlined link for each:

http://www.marsanomalies.com/mer-spiritandopportunity


There are a number of color methods used which give differing results.

Keith Laney's stuff gives a very nice color range.  It would be interesting to sample his pics for a possible pallette.

Other links are to Daniel Crotty, James Canvin, Michael Lyle, and Holger Isenberg - also to consider.

Of course, we can use any that I've done also.



__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Yes, thats an excellent idea and would be fairly easy to implement too. My search program will give us all the photos (in the database) that have L1 Pancam filters applied. Of course, the database is only small at the moment, but it will give the more recent ones back to about sol 2000 for spirit.

Where do we find the most 'official' colours pictures from? Which site, because some of the NASA ones may show the photographs with exaggerated red. Who knows what shenanigans they get up to....

How about using the colour scale on the rovers, the joystick thing with the colour stickers around it? I read somewhere that the colour scale on this was faulted and they have continued to use the same faulted scale ever since to maintain uniformity. Something like that anyway, I cannot remember exactly what was said.

I will post a link to a program that extracts a colour palette from a colour photograph so that we can choose one with a nice large even spread of colours. I have not written it yet, so it will be later on today I expect.

a possible problem: creating a greyscale picture from a colour picture requires that one value (either red,green,or blue) or an average is taken from each pixel value and used as the amount of 'grey' that is used.

__________________


 



Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

Okay, I just checked a bunch of those to see if I could find a good example.  It seems that they may have made a conscious effort not to release a color set where they've taken an L1 unfiltered image of a scene.

Hmmm.  confuse

I have not checked them all though, so maybe there is something out there.

Next best solution - we simply take a nice color set image with a nice wide range of color and convert it to grayscale - then we make our matches between the color pixel and the corresponding grayshade pixel at the identical location on the image to create the color pallete we will use.









__________________


Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

From Opportunity, we have these sols to gather data on the L1 - unfiltered gray image to hopefully compare to a full color image:

Opp sol: 22, 68, 309, 348, 363, 374, 409, 411, 418, 427, 429, 435, 442, 454, 546, 572, 620, 622, 630, 668, 706, 712, 774, 790, 812, 856, 911, 918, 958, 1015, 1044.

We probably want to use Spirit though, and we'll want our comparison image that we draw our color pallette from to be one with a wide range of different colors in it.







__________________


Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

Left Camera:
L1 - Empty
L2 - 750 (20)
L3 - 670 (20)
L4 - 600 (20)
L5 - 530 (20)
L6 - 480 (25)
L7 - 430 (SP)*
L8 - 440 Solar ND

I've thought about this some more, and have an idea I think you may like.


What we want to do is produce color images when we only have a single grayscale image to work with - like the navcam images, hazcam images, and so forth.  So, what colors should we use?  How about a color set that gives us a reasonable resemblance to the colors we get when we use a full color set? 

Grayscale images will vary in which colors are best depending on which filter was used - unfiltered images will have a different opimal set than any filtered image.

This is the idea:  We find pancam images taken with L1 - the unfiltered grayscale image.  Then we find the value for the grayscale gray shade that corresponds with the value of the same pixel from a full color assembled image of the same scene.  (We can then use the pallette we derive for any unfiltered image - such as those from the navcam).

With that in mind, I did a google search about L1 images.  There are only a few sols with this data:  Spirit sol 46, 136-141, 356, 567-569, 627, 656, 720-725, 799, 969, 995, and 1026.

We select our color matches from these datum - and then we can apply the same pallette we create to any unfiltered image.

http://www.lpi.usra.edu/meetings/7thmars2007/pdf/3155.pdf

If this works, we may want to make special pallettes to apply to the other filtered images - such as when we only have an L2, an L5, or L6 from the pancam- with each filter having a special replacement pallette for it that we've specially created.

How does this sound?









__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Resurrecting what I had done before and abandoned, this is what I have so far.

These are the colour swatches.

For anyone who does not know, this is an explanation of how it works.

As you may or may not know, each colour is represented by 3 numbers, a value for red, a value for green, and a value for blue. Together they make up the colours shown on your screen.

I have programmed the colour swatches linked above so that when the cursor is placed over the top of each 'square' of colour, the browser shows the colours numbers. The format for this is 123=111,222,333 (#aabbcc). The 123 is the block of colour number on the line. The 111,222,333 are the decimal numbers which represent the red, green, blue components of the colour. The #aabbcc is the hexadecimal value representing the same decimal numbers (these hexadecimal values are the ones traditionally used in the program, but it does not really matter, either is OK). I have placed an orange right border so that we can see where one colour ends and the next starts.

Working from the 0=black end....
I suggest that we start off assigning a colour to a group of greyscale pixels in the photograph. For example the first colour would represent the grey pixel values 1-5 perhaps. the next colour would represent the grey pixels that fell in the range 6-10. etc That would need 51+1 colours I think to begin with.

In this way we can fill in the colours as we go along. (The top line is the greyscale)
So far I have these colours in my table....as an example


__________________


 



Veteran Member

Status: Offline
Posts: 335
Date:
Permalink  
 

qmantoo, there's a freeware that will produce stereos for you. All you need to do is supply it with L/R b&w or color images and it combines them in a single b&w or color anaglyph. 

__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

Thank you all for your input. Maybe we can get there after all. I am happy to give it whirl now that I know we have some interest in the idea.

Marsrocks: I have all the components to do this, I just need to fit them together. The hardest/most tedious is to select the colours to replace the greyscale colours. I tried to do somehting similar at the start of my experimenting and the picture looked strange, but that may have been because I selected the wrong colours to replace the greys. For some reason some of the black 'blocks' in the scale look a bit green. I will do an example and show you.

Humanoid: I dont know how to make anaglyphs or stereo images. Is it a matter of offsetting a copy of the picture by a few pixels? Maybe you can explain, can you please?

__________________


 



Veteran Member

Status: Offline
Posts: 399
Date:
Permalink  
 

it wasn't me, qmantoo but sounds like it's worth a try.



__________________


Veteran Member

Status: Offline
Posts: 335
Date:
Permalink  
 

qmantoo, I'd suggest using anaglyphs in order to get a little more detailed view in a scene. In my experience a b&w stereo image is more detailed than a 2D color photo.

__________________


Veteran Member

Status: Offline
Posts: 432
Date:
Permalink  
 

qmantoo, it sounded as if you had the right idea.  I had thought of doing this once myself, but I don't have the software writing know-how.

This is how I would propose to do it: 

First - we are dealing with taking a grayscale image with up to 256 shades of gray and turning it into a color image... so, you will assign each shade of gray with a numerical value.:  i.e: 0 through 255 - with ultra white being at one extreme and ultra black being at the other end of your numerical values.

Your software must be able to detect each shade and return its value - unless maybe those numbers are already in the image data itself - maybe they are already there.


Now, you take those numerical values, and assign for them new color values.  Remember, we will only have 256 possible color values - so we want each one to be somewhat distinct to the eye from the next.  What I would suggest would be a rainbow type effect - but not a typical roygbiv rainbow.

I would put white as the top color - then a bright yellow - then darker yellows - then bright orange and yellow merging - bright orange to darker oranges - then an orange and bright red merge - then darker reds - let red and bright blue merge in high violet colors and take that down to dark purple - then brighter blues to darker blues- then lighter grays to darker grays - with black at the bottom.

The stair steps between each new color assignment should make logical sense to your eyes and merge with one another somewhat gracefully.  I didn't use green because I don't think it merges well - although you may consider using a green blue merge at the bottom and then darker greens as a replacement for the darker grays.

I think this is a good idea - I just don't know how to do it myself.  Obviously, the object is to tell the software to replace your custom color pallette for a grayscale pallet - so you must find logical color separation levels for each new substitute for the gray.

After first tests, you can tweak what you are doing b replacing colors in your custom color pallette.

If you continue with this, please show us results - Iwould like to see it.



__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

I think I have lost the plot. All I appear to have done is colour-fill the pictures which is not what I think it is all about. Reading the wikipedia page, it seem like it is used for adding extra elements of information such as height into a black and white photograph of the landscape.

I did not want to combine different filter views (which is what some of the other websites do L3,L5,L7) but I wanted to try and bring out more detail from the black and white photograph using colour, but I have realised that I do not know what I am supposed to do.

I have proved that I can probably do it, but I dont know what 'it' is or even whether it will help us to extract more detail from those pictures where there is only one filter shot.

I was trying to find some way of using the fact that the human eye can see more detail in colour photographs than it can in b & w ones, but now I am not sure what I should be doing to achieve that.

So.. unless someone has an idea what to do, I seem to have arrived at a dead end. sorry everyone, but sometimes unless you actually do something, you dont realise it is not what you wanted in the first place! smile.gif

These are the four pictures. If you load them each in a different browser tab, you can jump easily between each one as they are the same size and fit nicely on top of each other. Maybe it will give us some inspiration.

Original black & white
Red
Green
Blue

__________________


 



Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

I'll send you a message.

I will probably put two pictures on my website - a before and after and send you the link. Then maybe you can see if you think it is worth persuing this technique further or if it does not help much.

Processing each picture takes a fairly long time (~1 minute) as the program has to go through each pixel in the picture and substitute it for a different colour, so it is not a technique that can be batch run.

__________________


 



Dedicated to the truth

Status: Offline
Posts: 1217
Date:
Permalink  
 

gmantoo, I would love to help in whatever way I can. What do you need me to do ?

__________________


Teaching the truth

Status: Offline
Posts: 1921
Date:
Permalink  
 

I am now thinking along the lines of something called density slicing which, if I understand it correctly, is to take each grey that appears in a black and white photograph and allocates a colour to it. This allows for more detail to be picked out by the eye because it is now a colour image. I believe it was someone on here (gbull?) who posted a comment that the eye could pick out thousands more details in a colour picture than in a black and white one.

So.. would anyone interested in working with me on this project (basically testing and giving feedback to my programs) and see how we go? It may come to nothing, but I thought it might be worth a try to see if I can take the original b & w picture and program it in php into a colour density sliced photograph.
Q

From wikipedia....
Density slicing is a digital data interpretation method used in analysis of remotely sensed imagery to enhance the information gathered from an individual brightness band. Density slicing is done by dividing the range of brightnesses in a single band into intervals, then assigning each interval to a colour. For example, in a black-and-white thermal image the temperature values in the image can be split into bands of 2°C, and each band represented by a colour of the spectrum. Therefore the temperature information in the image can be analysed more easily because the differences between the colours are greater than the black and white and therefore it is easier to analyse the data contained in the image.

Density slicing is sometimes referred to as "double threshold".

__________________


 

Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard