Sample | code to evaluate (in a remote workspace) |
Get library version | Core getVersionString |
Library build information | Core getBuildInformation |
Path to Lena.jpg sample file (or empty string) | CVSamples findFile: 'Lena.jpg' required: false |
Path to haar cascade repo | Core library @@ #(data haarcascades) |
Load an image from file as an instance of Mat (or nil) | Imgcodecs imread: 'Lena.jpg' |
Show an image in a window (titled myWindow) and wait a for a key pressed | HighGUI imshow: #myWindow mat: (Imgcodecs imread: 'Lena.jpg') HighGUI waitKey: 0 |
Update a window | HighGUI updateWindow: #myWindow |
Close all windows | HighGUI destroyAllWindows |
Show a windows with an image converted to grayscale; and wait for a key pressed | | gray lena |
lena := Mat fileName: 'Lena.jpg'.
gray := Imgproc cvtColor: lena code: Imgproc colorBgr2gray.
HighGUI imshow: #myWindow mat: gray.
HighGUI waitKey: 0.
HighGUI destroyAllWindows |