Page 1 of 1

Re: Reversed Bilinear Distortion + Crop

Posted: 2013-08-11T08:08:44-07:00
by GreenKoopa
Welcome. Please share the exact command you tried. Before and after images may also help.

In that usage example, the input and output canvas sizes are the same. Is this what you are seeing, and what you want?

Re: Reversed Bilinear Distortion + Crop

Posted: 2013-08-11T10:55:00-07:00
by fmw42
Also post your IM version and platform

Re: Reversed Bilinear Distortion + Crop

Posted: 2013-08-17T10:35:28-07:00
by fmw42

Re: Reversed Bilinear Distortion + Crop

Posted: 2013-08-17T19:04:54-07:00
by GreenKoopa
etb972 wrote:the problem is that my image is not croped.. and has not the good size !
I'm not clear on your meaning. Do you know about the viewport setting of -distort ?

Re: Reversed Bilinear Distortion + Crop

Posted: 2013-08-18T09:19:47-07:00
by snibgo
I would use distort perspective for this. To avoid unnecessary processing, I'd start with an approximate crop. Windows scripts:

Code: Select all

convert 807434source.jpg ^
  -crop 1500x2400+1400+200 ^
  +repage ^
  p0.png
The corners of the posters have approximate coordinates:

58,208
1384,65
1366,2379
50,2243

I would shift these points to the corners of a rectangle that contains them:

58,208 58,65
1384,65 1384,65
1366,2379 1384,2379
50,2243 58,2379

So we have:

Code: Select all

convert 807434source.jpg ^
  -crop 1500x2400+1400+200 ^
  +repage ^
  -distort perspective "58,208 58,65 1384,65 1384,65 1366,2379 1384,2379 50,2243 58,2379" ^
  p1.png
You can now crop this down to the poster and resize, if you want.