Page 4 of 4
Re: How to overlay an Image on the base Image
Posted: 2015-07-17T23:07:12-07:00
by fmw42
hiren wrote:Thanks fmw42,
But how can I merge the shirt elbow fabric?
It is not looking proper.
Your white sleeve image has gray areas where you see these seems above that you have circled. Paint and/or blur out just those gray areas in the white sleeve image to be more white and try again. Use PS or GIMP to do the painting or blurring.
Re: How to overlay an Image on the base Image
Posted: 2015-07-17T23:23:14-07:00
by hiren
I found a solution to hide that image separation.
I make the edges more sharp and remove that white border using following.
Code: Select all
convert -size 600x600 tile:fabric.jpg fab_red_new.png
convert fab_red_new.png -rotate 20 -gravity southeast -extent 1200x1200-600-590 -transparent white -fuzz 10% -fill none -bordercolor black -draw "matte 0,0 floodfill" \
-channel alpha -morphology erode octagon:1 +channel fabric-sleeves-left-top.png
convert fab_red_new.png -rotate -39 -gravity southeast -extent 1200x1200-600-0 -transparent white -fuzz 10% -fill none -bordercolor black -draw "matte 0,0 floodfill" \
-channel alpha -morphology erode octagon:1 +channel fabric-sleeves-left-bottom.png
convert fabric-sleeves-left-bottom.png fabric-sleeves-left-top.png -geometry 1200X1200+0+0 -composite -transparent white sleeve_left_fabric.png
convert fab_red_new.png -rotate -20 -gravity southwest -extent 1200x1200-600-580 -transparent white -fuzz 10% -fill none -bordercolor black -draw "matte 0,0 floodfill" \
-channel alpha -morphology erode octagon:1 +channel fabric-sleeves-right-top.png
convert fab_red_new.png -rotate 15 -gravity southwest -extent 1200x1200-600-0 -transparent white -fuzz 10% -fill none -bordercolor black -draw "matte 0,0 floodfill" \
-channel alpha -morphology erode octagon:1 +channel fabric-sleeves-right-bottom.png
convert fabric-sleeves-right-bottom.png fabric-sleeves-right-top.png -geometry 1200X1200+0+0 -composite -transparent white sleeves_right_fabric.png
convert sleeve_left_fabric.png sleeves_right_fabric.png -geometry 1200X1200+0+0 -composite -transparent white sleeve_full_fabric.png
fact=`convert shirt_sleeve_full_front.png -auto-level -scale 1x1! -format "%[fx:0.5/mean]" info:`
convert \( shirt_sleeve_full_front.png -auto-level -evaluate multiply $fact -sigmoidal-contrast 10x50% \) sleeve_full_fabric.png \
\( -clone 1 -clone 0 -alpha set -virtual-pixel transparent -compose displace -set option:compose:args -5x-5 -composite \) \
-delete 1 -compose hardlight -composite sleeve_full.png
And I got following result
Thanks for help