Hello world of IM!
I have a new task on enlarging lips on the pic. I'm going to use Fish eye effect, but it is to be done at a certain area of the pic, like in previous forum branch viewtopic.php?f=1&t=28246.
Could you please tell me the algorithm? As earlier I'll send the examples of the result. Thank you in advance!
http://joxi.ru/zAN0YzBukBWgm9 region on face
fish eye
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: fish eye
You can try my script, bump, at the link below. It is just like the above effect in the link, but only uses -blur without the motion blur.
- leos2009
- Posts: 15
- Joined: 2015-08-25T07:50:55-07:00
- Authentication code: 1151
- Location: Ukraine, Kiev
- Contact:
Re: fish eye
how to move from the center point(x,y) to the right place for me in your script? can i use semi-circle in your script?)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: fish eye
No, my script does not allow either. But you have the concept from the earlier code in the link you have above and should be able to do the same kind of thing. You just need to create a mask image where you want the changes, then blur it and composite over a gray image, then use it as a displacement map. Do not do the motion-blur.
EDIT: see above
EDIT: see above
- leos2009
- Posts: 15
- Joined: 2015-08-25T07:50:55-07:00
- Authentication code: 1151
- Location: Ukraine, Kiev
- Contact:
Re: fish eye
UPD: New video with worked algoritm for fish eye in some region in image https://youtu.be/dSAxAq7J3SY
i croped lips region from orig image and applied you script bump. then converted file pasted on the orig image top
i think that is simplest way to solve the task
i croped lips region from orig image and applied you script bump. then converted file pasted on the orig image top
i think that is simplest way to solve the task
Code: Select all
<?php
$xpoz = $_POST['xpoz'];
$ypoz = $_POST['ypoz'];
$radius = $_POST['radius'];
$soften = $_POST['soften'];
$dist = $_POST['dist'];
$lips = $_POST['lips'];
$filename = time().'.png';
$path_file = 'files/'.$filename;
$convert = '/opt/local/bin/convert'; //path to IM for MAC OS (#type -a convert)
$myfile = 'files/lady.jpg';
//...previous code for eye brows up....
exec($convert.' '.$path_file.' -crop 84x45+107+223 files/temp.png'.' && '.
'sh /opt/local/bin/bump -a '.$lips.' -r 30 files/temp.png files/9999.png'. ' && '.
$convert." -draw 'image Over 107,223 84,45 files/9999.png' ".$path_file." ".$path_file);
//.......