Image module provides a class with the same name which is used to represent an image.
EasyCV uses BGR color scheme in the internal representation. This makes the interface with opencv easier and faster. Be aware of this if you use the array directly.
The following script loads and displays an image from a file and then from a url.
from easycv import Image img = Image("lenna.jpg").show() img_from_url = Image("www.example.com/lenna.jpg").show()
The following script uses the image from the last example. It turns the image into grayscale and then blurs it.
from easycv.transforms import Blur, Grayscale img = img.apply(Grayscale()) img = img.apply(Blur(sigma=50)) img.show()
If you are running Easycv inside a jupyter notebook there is no need to call
, the image will be displayed if you evaluate it.
Lazy images are only loaded/computed when their updated array data is needed. Methods that need the updated image need to have this decorator to ensure that the image is computed before their execution.