Search found 9 matches

by roipoussiere
2016-08-04T05:17:06-07:00
Forum: Users
Topic: Pick a color and use it in a IM command
Replies: 13
Views: 5270

Re: Pick a color and use it in a IM command

For example, of the edge pixels, I found the minima and maxima red values.
Ok, but did you do that with IM or with an other language?
by roipoussiere
2016-08-03T04:03:58-07:00
Forum: Users
Topic: Pick a color and use it in a IM command
Replies: 13
Views: 5270

Re: Pick a color and use it in a IM command

Well, sorry I think this is beyound my knowledge in image processing...

A working example could help me, how did you get tango_FUZZ and tango_MID?
by roipoussiere
2016-08-02T17:43:41-07:00
Forum: Users
Topic: Image distortion from a B&W mask
Replies: 10
Views: 4088

Re: Image distortion from a B&W mask

Phew, I finished the first step: distorting the picture by looking for corners as you suggested:

#!/bin/sh

# creating the mask
convert original.jpg -fuzz 25% -fill None -floodfill +0+0 '#0a613e' -alpha extract -morphology Open Disk -resize 200 mask.png

# creating corner pitures
convert -size 4x4 ...
by roipoussiere
2016-08-02T15:49:43-07:00
Forum: Users
Topic: Pick a color and use it in a IM command
Replies: 13
Views: 5270

Re: Pick a color and use it in a IM command

What is your IM version and platform? Syntax differs.
Ubuntu, IM v6.8.9

Thanks a lot for your responses!

I think I prefer the version with $color. :-)

It does, but "-scale 1x1!" also does, and is quicker.
Ok!

Just an other related question:

You used -format "%[pixel:u.p{0,0}]" info:) to ...
by roipoussiere
2016-08-02T11:06:05-07:00
Forum: Users
Topic: Image distortion from a B&W mask
Replies: 10
Views: 4088

Re: Image distortion from a B&W mask

If on Unix, you could try my script unperspective at the link below

Wow, wonderful script, congrats! :-)

I applied unperspective , the book looks better :-)

./unperspective -f 5 -V output.png stretched.png

http://i.imgur.com/9EdBM1u.png

I will try -morphology on my mask and -distort ...
by roipoussiere
2016-08-02T10:23:57-07:00
Forum: Users
Topic: Pick a color and use it in a IM command
Replies: 13
Views: 5270

Pick a color and use it in a IM command

As explained in a previous post , I extracted a mask from a photo:
convert original.jpg -fuzz 25% -fill None -floodfill +0+0 '#0a613e' -alpha extract -morphology Open Disk mask.png
Note here I use the color #0a613e , which I picked using Gimp.

Now I would like to automatically detect the ...
by roipoussiere
2016-08-02T06:58:47-07:00
Forum: Users
Topic: Image distortion from a B&W mask
Replies: 10
Views: 4088

Re: Image distortion from a B&W mask

1. Find the four corners.
Ok, I can do this with IM? How?

So to use your module, I use http://im.snibgo.com/sh2sh.htm#sh2shLinear.bat (which I should rewrite I think, because I use Linux) and then do something like:

sh2shLinear.bat sh2shLinear output.png mask.png h 75 r stretched.png 0

that's ...
by roipoussiere
2016-08-02T06:08:30-07:00
Forum: Users
Topic: How to change png file parameter IHDR width using imageshack
Replies: 3
Views: 2780

Re: How to change png file parameter IHDR width using imageshack

How to change png file parameter IHDR width using imageshack
I suppose you mean using imagemagick

You can use extent to change the image width without altering the image, and set the background to white:

convert kXhet.png -background white -extent 384x42 output.png

result:

http://i.imgur ...
by roipoussiere
2016-08-02T05:10:42-07:00
Forum: Users
Topic: Image distortion from a B&W mask
Replies: 10
Views: 4088

Image distortion from a B&W mask

Hello,
I digitalized several big books with a camera (~1000 photos), using a green background. I would like to make them more readable.

Original photos looks like this (this is an example, not the real books, which are much bigger) :

http://i.imgur.com/v7Yrn5k.png

I first extracted a mask ...