xatolarni aylantirish cv :: mat to cv :: arr

I'm just trying to learn about OpenCV and i running on a x64 machine.

I am using OpenCV 3.2.0 with VS2015 before and I try to following step by step tutorial from Kyle Hounslow on youtube, but i get error.

then i reinstall using VS2013, but i still got error like below :

Error 1   error C2664: 'void cvShowImage(const char *,const CvArr *)' : cannot convert argument 2 from 'cv::Mat' to 'const CvArr *'
Error   2 IntelliSense: no suitable conversion function from "cv::Mat" to "const CvArr *" exists

i already see in link below but still doesn't work for me

OpenCV can't compile

i check on link below too, but i got confused

how to convert from cv::Mat to CvArr?

my code is like below :

#include
#include
#include
#include
#include
#include


using namespace cv;

int main()
{

  Mat image;

  VideoCapture cap;
  cap.open(0);

  cvNamedWindow("window", 1);

  while (true)
  {
      cap >> image;

      cvShowImage("window", image);

      cvWaitKey(33);
  }


}

please help me in that, ko'p rahmat.

Uzr, yangilanishni o'chirib tashlayman, chunki original muammo allaqachon echilgan

ko'p rahmat

0
CvMat , konstruktorda arg kodi sifatida Mat ni qabul qiladi: CVMat imageMat (image); va undan so'ng cvShowImage : cvShowImage ("window", & imageMat); , siz aslida dimension va dtype fayllaridan o'tishingiz kerak, ya'ni CvMat imageMat (height, width, dtype, image);
qo'shib qo'ydi muallif EdChum, manba
Eski "C api" dan foydalanmang! Siz hujjatlari ni qanday bajarish kerakligi haqidagi misol uchun
qo'shib qo'ydi muallif Miki, manba
@RizkySatya va iltimos, javobingizni muammoni hal qiladigan javobni belgilang
qo'shib qo'ydi muallif Miki, manba
@RizkySatya va iltimos, javobingizni muammoni hal qiladigan javobni belgilang
qo'shib qo'ydi muallif Miki, manba
@RizkySatya va iltimos, javobingizni muammoni hal qiladigan javobni belgilang
qo'shib qo'ydi muallif Miki, manba
agar asl muammosi hal etilsa va boshqa muammolarga duch kelsangiz, iltimos, yangi savol oching
qo'shib qo'ydi muallif slawekwin, manba
albatta, kechirim so'rayman
qo'shib qo'ydi muallif Rizky Satya, manba
albatta, kechirim so'rayman
qo'shib qo'ydi muallif Rizky Satya, manba
albatta, kechirim so'rayman
qo'shib qo'ydi muallif Rizky Satya, manba
@Miki ishonch, ko'p rahmat
qo'shib qo'ydi muallif Rizky Satya, manba
@Miki ishonch, ko'p rahmat
qo'shib qo'ydi muallif Rizky Satya, manba
@Miki ishonch, ko'p rahmat
qo'shib qo'ydi muallif Rizky Satya, manba

6 javoblar

C ++ Mat ishlatish zarur bo'lsa, imshow ("window", image) dan foydalaning.

according to opencv docs

Ko'rsatilgan oynada tasvirni ko'rsatadi.

C++: void imshow(const string& winname, InputArray mat)

C: void cvShowImage(const char* name, const CvArr* image)

1
qo'shib qo'ydi

C ++ Mat ishlatish zarur bo'lsa, imshow ("window", image) dan foydalaning.

according to opencv docs

Ko'rsatilgan oynada tasvirni ko'rsatadi.

C++: void imshow(const string& winname, InputArray mat)

C: void cvShowImage(const char* name, const CvArr* image)

1
qo'shib qo'ydi

C ++ Mat ishlatish zarur bo'lsa, imshow ("window", image) dan foydalaning.

according to opencv docs

Ko'rsatilgan oynada tasvirni ko'rsatadi.

C++: void imshow(const string& winname, InputArray mat)

C: void cvShowImage(const char* name, const CvArr* image)

1
qo'shib qo'ydi

Yangi C ++ api ( eskirgan C api ( cvNamedWindow , cvShowImage , cvWaitKey > Mat , VideoCapture ). Buni qilmang. C api ni butunlay tashlang. CvFunctionName kabi barcha narsalar eskirgan. cv dan foydalanadigan yangi api nom maydoni sifatida foydalaning, shuning uchun cv: functionName kabi ismlar sizni chaqirishi kerak.

Sizning davlatingizda cv :: namedWindow , cv :: imshow va cv :: waitKey :

using namespace cv;

int main()
{
    Mat image;

    VideoCapture cap;
    cap.open(0);

    namedWindow("window", 1);
    while (true)
    {
        cap >> image;
        imshow("window", image);
        waitKey(33);
    }
}
0
qo'shib qo'ydi
Menga siz taklif qilayotgan narsani sinab ko'rmoqchiman va cv: mat to cv: arr ni aylantirish uchun xatolik yo'q, lekin hozirda men foydalanadigan nizolarning mashinasi bor. Yuqoridagi natijani yangilayman
qo'shib qo'ydi muallif Rizky Satya, manba

Yangi C ++ api ( eskirgan C api ( cvNamedWindow , cvShowImage , cvWaitKey > Mat , VideoCapture ). Buni qilmang. C api ni butunlay tashlang. CvFunctionName kabi barcha narsalar eskirgan. cv dan foydalanadigan yangi api nom maydoni sifatida foydalaning, shuning uchun cv: functionName kabi ismlar sizni chaqirishi kerak.

Sizning davlatingizda cv :: namedWindow , cv :: imshow va cv :: waitKey :

using namespace cv;

int main()
{
    Mat image;

    VideoCapture cap;
    cap.open(0);

    namedWindow("window", 1);
    while (true)
    {
        cap >> image;
        imshow("window", image);
        waitKey(33);
    }
}
0
qo'shib qo'ydi
Menga siz taklif qilayotgan narsani sinab ko'rmoqchiman va cv: mat to cv: arr ni aylantirish uchun xatolik yo'q, lekin hozirda men foydalanadigan nizolarning mashinasi bor. Yuqoridagi natijani yangilayman
qo'shib qo'ydi muallif Rizky Satya, manba

Yangi C ++ api ( eskirgan C api ( cvNamedWindow , cvShowImage , cvWaitKey > Mat , VideoCapture ). Buni qilmang. C api ni butunlay tashlang. CvFunctionName kabi barcha narsalar eskirgan. cv dan foydalanadigan yangi api nom maydoni sifatida foydalaning, shuning uchun cv: functionName kabi ismlar sizni chaqirishi kerak.

Sizning davlatingizda cv :: namedWindow , cv :: imshow va cv :: waitKey :

using namespace cv;

int main()
{
    Mat image;

    VideoCapture cap;
    cap.open(0);

    namedWindow("window", 1);
    while (true)
    {
        cap >> image;
        imshow("window", image);
        waitKey(33);
    }
}
0
qo'shib qo'ydi
Menga siz taklif qilayotgan narsani sinab ko'rmoqchiman va cv: mat to cv: arr ni aylantirish uchun xatolik yo'q, lekin hozirda men foydalanadigan nizolarning mashinasi bor. Yuqoridagi natijani yangilayman
qo'shib qo'ydi muallif Rizky Satya, manba