Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a lot of things that go on in red eye removal </p> <p>A. Eye Detection </p> <p>B. Red Eye Region Mapping</p> <p>C. Fill Color </p> <p>D. Fuzz</p> <p>E. Opaque </p> <p><strong>My advice</strong> </p> <p>If not a JOB for Jquery and even PHP would not remove red eye effectively </p> <p><strong>Likely Solution</strong> </p> <ol> <li><p>Get a Jquery area selection script where users can select their red eyes them self ( With this you would be able to get the region (X1 , Y1 , X2 , Y2 , Height , Width ) example <a href="http://odyniec.net/projects/imgareaselect/" rel="nofollow">http://odyniec.net/projects/imgareaselect/</a></p></li> <li><p>Have a simple Color Picker where they can select replacement color ??? Default can be black </p></li> <li><p>Send request to <code>imagemagick</code> using <code>exec</code> in PHP for the red eye removal </p></li> <li><p>You can not output your image ...</p></li> </ol> <p><strong>EDIT 1</strong></p> <p>I was able to help you get a ready command line tool for this JOB </p> <p><a href="http://www.fmwconcepts.com/imagemagick/index.php" rel="nofollow">http://www.fmwconcepts.com/imagemagick/index.php</a> http://www.fmwconcepts.com/imagemagick/redeye/index.php</p> <p>Basic Concept </p> <p>A. Create a desaturate copy of the input image</p> <p>B. Perform a fuzzy floodfill to create a mask image</p> <p>C. Composite the original with the desaturated image using the mask image</p> <p>D. Apply a morphologic close operation to fill in the specular hole in the mask and then create a difference operation to create a new mask of just the hole</p> <p>E. Apply the new mask to composite the previous result with a full lightness, zero saturation version of the original image</p> <p>Sample Process </p> <pre><code>convert -quiet -regard-warnings "$infile" +repage "$tmpA1" convert $tmpA1 -modulate $light,$sat,100 $tmpA2 proc="" for ((i=0; i&lt;np; i++)); do proc="$proc matte ${pairArray[i]} floodfill" done convert $tmpA5 -fuzz $fuzz% -fill none -draw "$proc" \ -fill "rgba(255,255,255,1)" +opaque "rgba(0,0,0,0)" \ -fill "rgba(0,0,0,1)" -opaque "rgba(0,0,0,0)" \ -alpha off -negate $tmpA3 if [ "$dilate" = 0 ]; then dilation="" else dilation="-morphology dilate disk:$dilate" fi convert $tmpA1 $tmpA2 $tmpA3 -compose over -composite $tmpA2 convert $tmpA3 \( +clone -morphology close disk:$rad $dilation \) \ -compose difference -composite -auto-level \ -negate -threshold 0 -negate $tmpA4 convert $tmpA2 \( $tmpA1 -modulate 100,0,100 \) $tmpA4 \ -compose over -composite $outfile </code></pre> <p>I hope this helps </p> <p>Thanks</p> <p>:)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload