createMat unrecognised function error

조회 수: 4 (최근 30일)
Malcolm
Malcolm 2024년 7월 10일
댓글: Malcolm 2024년 7월 10일
I have installed Computer Vision Toolbox and Image Processing Toolbox but I still get this error when I try and use createMat:
Unrecognized function or variable 'createMat'.
Error in opencv_tests (line 4)
[inputMat,inputArray] = createMat(img);
My code:
import clib.opencv.*;
import vision.opencv.util.*
img = imread("cakes.jpeg");
[ocvMat,ocvArray] = createMat(img);
Looks like it's not picking up the add ons?

채택된 답변

Bhanu Prakash
Bhanu Prakash 2024년 7월 10일
편집: Bhanu Prakash 2024년 7월 10일
Hi Malcolm,
You might also need to install the Add-on 'Computer Vision Toolbox Interface for OpenCV in MATLAB' to use the 'createMat' function. If you haven't installed it yet, please do so and try running the code again.
You can find more details about the 'createMat' funciton in the following documentation:
I hope this helps!
  댓글 수: 1
Malcolm
Malcolm 2024년 7월 10일
Awesome! That sorted it.
It's odd that this wasn't listed as a requirement - would have saved me a lot of head scratching.
Anyway, many thanks for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by