Sign in to follow this  
Guest Par4me

Automatically coloring B&W photos

Recommended Posts

I guess it's time for my bi-annual post. I've been reading a bit about automatically coloring b&w photo's here lately. I've been tinkering with it off and on for a while and I'd like to get some input on if my results are worth it or maybe there's something better already out there. First off, my goal isn't really to write something to do a small area perfectly. It's to be able to crank out a large area (A county or maybe even a large part of a state in a reasonable time) fairly decently. Anyway, without going into much detail needlessly yet, I wrote a program to take a color photo compare it to a grayscaled image of the same photo and remember the change based on surrounding pixels. I used pics of the Erie,Pa area at AirphotoUsa for my colored pics. After many samples, I tried to recolor a photo that the program had never seen. I tried to match the contrast and brightness of the b&w's the best that I could. That took a little bit of tinkering. If I've added these attachments right, my results should be here somewhere. (Please forgive my posting ignorance, I don't do it much) I need some feedback. Given the quality of the color photo's I started with I'm pretty happy. I'd like to find better quality colors to sample but I don't know where. Maybe someone has something out there that does the same thing. I just haven't seen it. Please remember my original goal. I can color better by hand but this does a 500x500 in about 20-30 seconds and a 2000x2000 in about 1 1/2 minutes. I layer it over the gray, cut out some roads, and I wrote a program to color the water if I wish. I've never had much luck with the Layering of different shades of a b&w. I've always had to paint them by hand or use pixel replacement. Well that's about it. I'd appreciate any feedback, even constructive negative.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi!Well, all I can say is that I think you should be satisfied with the quality of those pictures. The colouring is fully acceptable, and the most important is that once the B/W-pics are converted to "summer colours", the rest of the seasons are easier to create.You write that you have coloured a pic that the program had not seen before - if I understand this right then it should be possible to colour B/W-pics using the colourscale of the FS2004 bitmaps (to closer match the default textures)? I believe that there are many people, including myself, that are very interested in knowing how you achived this result, considering the recent postings in this forum. Any information that you are willing to share is highly appreciated. Most interesting, keep up the good work!Regards/hans

Share this post


Link to post
Share on other sites

In my opinion the results are impressive. Maybe a little more contrast. Anyway, as for a large area as for start to work in a small area this tool will be an excelent helpI would like test it, is possible?Congratulations, good work!Jos

Share this post


Link to post
Share on other sites

Thanks for the input. I don't own fs2004 so I don't know about using it's textures for a color reference. The 2 biggest problems for me seem to be 1.Turning the color pic to a grayscale that matches the pics I want to color later. and 2.The program doesn't seem to work all that well on pics with a resolution much lower than 4m/pix...I haven't tried it on anything better than 2m. I also agree that the results could have a bit more contrast. I think that most of that lies in the original color pics that I've sampled. I just attached the raw pics without any doctoring so that people could see the exact results. I'm hoping to make it a bit more user friendly this weekend so that if a few people want to try it they can. I don't have allot of spare time in the summer so support would be minimal at best. It's simple to use. Just 5 or 6 buttons....no menus....It's very basic. Right now though everything has to be in the default directories for it to work and there aren't many error catchers. Anyway, if I ever get it done, I'm hoping to put it in the library and offer it for 100% FREE. So if anyone wants to collaborate that would be great. Please keep the "free" part in mind though. I just do this for fun. Thanks again for the input guys.

Share this post


Link to post
Share on other sites

Please check your mail here on avsim.Regards,BobSSeems the rage to talk about the "size and speed" of each others computer. Beat this if you can for solving novel/unique problems.. ..Have K&E and know how to use it!

Share this post


Link to post
Share on other sites

I think they look great. In fact, I'd like to do just what you've done. I've been hand painting 3 aerials for my CYWG scenery and they do not look nearly as good as yours. How do you do it?Thanks, Adam

Share this post


Link to post
Share on other sites

Hi,I also think your result looks pretty good. Here in New Zealand we have freely available black and white orthophotos of a large area of the country but only a small area in colour. Your program sounds like it would be good for using the colour ones we do have as patterns for the B&W's.By the way, have you looked at Larry Jones' "ColorBMP" program (in the AVSIM library? I spent a bit of time trying it out and the results were OK, but not quite good enough to use.Regards

Share this post


Link to post
Share on other sites

Sorry, for not being more detailed earlier. Basically, I just look at the gray pixels value, the pixel 2 to the left and the one 2 down. I then compare it to the value of a colored pic of the same area. I wrote a little vb program to do it automatically. Right now it only handles 500x500 pix at a time and it is very "user unfriendly" I'm trying to work on that. Maybe by this weekend I can have it ready as a "Very Beta" kind of program. Sorry if I seem to be teasing, that's not my intention. I'm just still working on some problems and as I stated in my original post, I wanted to see if there was any interest and also if maybe someone has done this before. Trust me, this is not a "magic cure". As of now, stuff like the order of the sampled pics, the quality of them and even the resolution has huge effects. I'm working on them as I have time. The other major problem that I have is getting the quality and "values" of the b&w of the colored sample tho match the values of the b&w's that I want to color. Any sugestions?Abent...I feel your pain. The reason that I started trying this is that I got sick of hand painting 2000x2000 bmps of little pieces of my world. (15-20 hrs each minimum) This is actually the 3rd or 4th program I've written for myself. One colors field colors and another colors forests. Layer the 2 and cut out the part you don't want....Sorry I digress. It still takes entirely too long to do a large area. I wanted to say that I've tried to use a New Zeland site (NZMG....) for my color samples and I didn't have much luck. Maybe it was because the pics I sampled were at a lower resolution than the ones I was coloring or that I didn't match up the b&w's good enough. I'm not sure. I'm just really trying to stress the point that this is all preliminary and that I just needed some opinions. I thank everyone for that. Everything I've seen so far has seemed posotive. It gives my some drive to continue.

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