Open Source Computer Vision Library https://opencv.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
468 B

#!/usr/bin/octave -q
addpath(getenv("OCTAVEPATH"));
highgui;
cv;
I=cvLoadImage("frame.jpg");
a=cv2im(I);
I2=im2cv(a, CV_8UC(1));
imshow(cv2im(I));
imshow(cv2im(I2));
a=rand(3,3,3);
b=mat2cv(a,CV_64FC(1));
c=cv2mat(b);
assert(all(a==c));
a=eye(3);
b=mat2cv(a,CV_64FC(1));
c=cv2mat(b);
assert(all(a==c));
assert(all(cv2mat(mat2cv(eye(3),6))==eye(3)));
I=cvLoadImage("frame.jpg");
a=cv2im(I);
I2=cvCloneImage(I);
cvSobel(I,I2,2,2);
imshow(cv2im(I2));
imshow(a);