Page 1 of 1

exist any way of enlarge only parts of determining color in imagemagick ?

Posted: 2017-09-22T10:49:20-07:00
by diegomage
exist any way in imagemagick or another technique from another software that I could use

for enrlage parts in blue like this

Image


Image


Please help me with this

Re: exist any way of enlarge only parts of determining color in imagemagick ?

Posted: 2017-09-22T11:19:13-07:00
by snibgo
You could break the problem into smaller problems like this:

1. Cut the image vertically into five pieces: two are blue, three are not blue.

2. Resize the blue pieces, enlarging them horizontally.

3. Append the five pieces together.

Is that what you want?

So, the smaller problem is determining where to make the cuts in (1). The image has roughly three colours: black, white and blue. After scaling to one row, each pixel either has some saturation (it is blue), or has no saturation. So threshold on some saturation. The border between black and white says where to make the cuts.