What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Replace a range of colors with just one (or two, see msg)?


r00k13

New Member
Messages
2
Likes
0
Hi.

I have a grayscale image, which has a certain wanted pattern of colours + some unwanted colors.


The colors I want to leave are (rgb):


000
666
121212
181818
242424
303030
363636
424242


As you can see, there's a pattern :) Unfortunately there are some really "hard to select" colors also (other's that the previously mentioned, e.g. white and near that). The unwanted colors are actually contours (curves for height changes of the terrain), so they would be really tiresome to edit manually. The image is 2048 x 2048 pixels. The image is for a game engine to create a 3D-map from actual map data. The game engine reads the colors and then creates the terrain (height changes) according to the actual map data. Unfortunately my Photoshop skills left me with an image with the correct areas of the selected number of colors, but also with the unwanted contours :(


How could I remove the "white" curves and replace those with either colour beside the curve without having to manually "overdraw" all the hundreds of curves? :/ Actually, this is just a start as the real challenges have way more curves the map size being much bigger.

All the gurus out there, I need your help!

Link to image (bmp):

https://onedrive.live.com/redir?resid=C769995EB0B2279B!43275&authkey=!AKcPZK-UZ5mHle4&v=3&ithint=photo%2cbmp


 
It sounds like you might have some programming skills. If so, using just a handful of statements in Matlab (...the Image Processing Toolbox, to be specific...) you could read in the bmp file, run it through a few IF statements, resave it, and you would be done.

Just a thought.

Tom M
 
It sounds like you might have some programming skills. If so, using just a handful of statements in Matlab (...the Image Processing Toolbox, to be specific...) you could read in the bmp file, run it through a few IF statements, resave it, and you would be done.

Just a thought.

Tom M

Sorry, but my programming skills are way too lame for that :) The tip using Mathlab is actually something I did not know/realise :) Thanks :thumbsup:I might ask someone here at the university to help me on this.
 

Back
Top