Jump to content

  • Log In with Google      Sign In   
  • Create Account


Isolines (contours) and image coloring


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Martin Perry   Members   -  Reputation: 1261

Like
0Likes
Like

Posted 18 October 2012 - 06:41 AM

Hi,

I have image with contours (isolines) that represent temperatures.
Something like this:
Posted Image

Now... I want to color image... areas between isolines with certain color. So far, I extract areas from image (with seed-fill / flood-fill). Than I have list of coordinates for each area... after that I found area border value and according to this I color inside of area... problem with this approach is, that
a) not very fast
b) is aferas are small, incorrect plotting of edges create areas detection incorrect

How to do this better ?

Sponsor:

#2 JTippetts   Moderators   -  Reputation: 8408

Like
0Likes
Like

Posted 18 October 2012 - 07:08 AM

How are the contours generated? If you have access to the data set from which they were constructed, you could use that to construct a function that can be called for any point to give you the interpolated value of the function at that point, and the point can be colored based on this value.

#3 Martin Perry   Members   -  Reputation: 1261

Like
0Likes
Like

Posted 18 October 2012 - 07:26 AM

I have only contours and its values.. not dataset. Contours are generated from "Marching Squares".. but it doesnt matter, it could be any algorithm.

#4 pacobarter   Members   -  Reputation: 115

Like
0Likes
Like

Posted 20 October 2012 - 06:37 AM

You could use the same "marching squares" algorithm in a second pass to "fill the gaps" between the isolines.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS