Reputation: 613
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.
Upvotes: 9
Views: 1443
Reputation: 15917
There is a recent binding to OpenCV (for Pharo 7 a.t.m.) at https://github.com/feenkcom/gt4opencv
Upvotes: 1
Reputation: 14538
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:
.
Upvotes: 1