search

Home  >  Q&A  >  body text

javascript - Can canvas realize the function of PS magic eraser?

Feeling canvas The function is very powerful. Can it recognize the background color of normal photos?

My own idea is to use getImageData to obtain the RGBA value of the pixel, and then identify the most identical values ​​around it as the background color.

However, normal photos will be affected by factors such as light, resulting in normal recognition.

Is there any way to do this?

Please explain, thank you.

高洛峰高洛峰2784 days ago603

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 13:26:09

    http://leimi.github.io/drawin...

    reply
    0
  • Cancelreply