what is this programming language

Thread Starter

denison

Joined Oct 13, 2018
252
Hi All, I am referring to a tutorial called opencv install in windows 10 by sik_ho tsang. I want to use opencv for computer vision. You can find this on google. Anyway I followed all of his instructions to run the program which is supposed to display 2 coloured circles. It didn't work.
I have been thinking that the programming language he is using is not C++ which I have selected in Visual Studio 2019 when I downloaded it. I have attached a file showing the coding. Is that C++. ?
I entered VC++ as he suggested in the visual studio application. This may be the problem as a file on my computer called VC++ is empty. Then on google I found that VC++ is supposed to be a compiler for C++. Tsang says nothing about having to download VC++. When I ran the program I didn't get any message saying the program cannot compile. All it said was it couldn't find a file but it didn't say what file.
Also I don't think he is using windows 10. I have windows 10 and the 'edit system variables' is quite different from that shown by Tsang.
Any assistance in getting Tsangs program working would be appreciated. The program is a test to see if opencv is working on my computer. Here is the program.
C:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
  Mat image = Mat::zeros(300, 600, CV_8UC3);
  circle(image, Point(250, 150), 100, Scalar(0, 255, 128), -100);
  circle(image, Point(350, 150), 100, Scalar(255, 255, 255), -100);
  imshow("Display Window", image);
  waitKey(0);
  return 0;
}
 

Thread Starter

denison

Joined Oct 13, 2018
252
VC++

OpenCV is a library written in C++. You need a platform to take advantage of it, such as Java, MATLAB, Python, Visual Studio.

https://towardsdatascience.com/install-and-configure-opencv-4-2-0-in-windows-10-vc-d132c52063a1
I am using Visual Studio Mr Chips. Can't get his program to work. Perhaps I should also be downloading VC++. Do you want to give it a go and see if you can get his program to work. Then if you do I should be able to see where I went wrong.
 
Top