I would like to use Smalltalk (Pharo) to better refactor my image processing and computer vision code/algorithms, written in other languages. I have not found a lot of examples online where Smalltalk is used for processing images (or video frames). I would like to know whether
i) there is an opencv/image/computer vision library available for Smalltalk that is easily installed or
ii) someone could give an example of how to access the pixel data in an image and threshold it using Smalltalk.
Computer vision (CV) and image processing are two closely related fields that utilize techniques from artificial intelligence (AI) and pattern recognition to derive meaningful information from images, videos, and other visual inputs.
However, Image Processing is also very important to prepare images for Computer Vision models, such as applying segmentation or labeling known objects. Computer Vision generally refers to the technologies involved in allowing computers to make sense of images.
Computer vision and image processing are two completely different tools used for various purposes, but both image processing and computer vision are always about an image.
Digital Image Processing deals with capturing and translating a visual signal into a digital image. As such, it can be viewed as the area that studies the process of obtaining a visual signal of the world and transforming it in order to make it interpretable.
For the first question, you can maybe write your own interface using FFI to the OpenCV C-API.
For the second question, I think it's easy to use ImageReadWriter formFromFileNamed:
and then can use pixelValueAt:
to read the value, threshold, and then write back by pixelValueAt:put:
.
There is a recent binding to OpenCV (for Pharo 7 a.t.m.) at https://github.com/feenkcom/gt4opencv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With