Open alfamousts opened 6 years ago
I am using opencv 3.0.0. I tried to run a simple program was showing IP Cam and it run perfectly without error. use opencv 3.0.0 also. The program like this : `#include "opencv2\opencv.hpp"
using namespace cv; using namespace std;
const int fps = 20;
int main(int argv, char** argc)
{ Mat frame; VideoCapture vid(1);
if (!vid.isOpened())
{
return -1;
}
while (vid.read(frame))
{
imshow("webcam", frame);
if (waitKey(1000 / fps) >= 0)
break;
}
}`
I follow your instruction to put command : darknet_no_gpu.exe detector demo data/coco.data yolo.cfg yolo.weights http://192.168.0.3:8080/video?dummy=param.mjpg -i 0
I have check the IP Address for my camera every send command line. and put the IP address in program : Configuring IP Camera Adapter
But i also tried using YOLO for video i've download from youtube, and demo box is showing the video very slow. Is it caused by side effect when iam using no gpu or anyelse?
But i also tried using YOLO for video i've download from youtube, and demo box is showing the video very slow. Is it caused by side effect when iam using no gpu or anyelse?
Yes.
I follow your instruction to put command : darknet_no_gpu.exe detector demo data/coco.data yolo.cfg yolo.weights http://192.168.0.3:8080/video?dummy=param.mjpg -i 0
Can you see anything if you use your own custom OpenCV application with this URL? http://192.168.0.3:8080/video?dummy=param.mjpg
VideoCapture vid(1);
What command line do you use to detect from Web-camera using Darknet Yolo?
Now i use darknet.exe but now the problem is when i type this command on command line "darknet.exe detector demo data/voc.data yolo-voc.cfg yolo-voc.weights -c 0"
No demo window was showing, the light of my laptop webcam only turn on for the moment. (Only 1s i think) and then the light is off, and at the command prompt it written like this : strem closed.: No error
darknet.exe detector demo data/coco.data yolo.cfg yolo.weights http://192.168.0.18:8080/video?dummy=param.mjpg -i 0
I also try using IP camera. And the output like this `[mjpeg @ 00000293c6581ae0] overread 8 [2J[1;1H FPS:0.0 Objects:
Stream closed.: No error`
Are you have any suggestion to fix this problem ?
opencv_ffmpeg300_64.dll
in the same folder where is your darknet.exe
file?
#include "opencv2\opencv.hpp"
#include <stdint.h>
#include <string>
using namespace cv; using namespace std;
const int fps = 20;
int main(int argv, char** argc) { Mat frame; std::string net_cam = "http://192.168.0.18:8080/video?dummy=param.mjpg"; VideoCapture vid(net_cam );
if (!vid.isOpened()) { return -1; }
while (vid.read(frame)) { imshow("webcam", frame); if (waitKey(1000 / fps) >= 0) break; } }
I am using opencv 3.4.0 and i have put the opencv_ffmpeg340_64.dll in near file darknet.exe
Yes i can use the ip cam with that code.
Try to install Gstreamer and OpenCV with Gstreamer support: https://cvexplorare.wordpress.com/2016/11/15/opencv-gstreamer-windows/ Apparently it helps on Linux to use Web Camera: https://github.com/pjreddie/darknet/issues/292#issuecomment-368305508
Run this in terminal (cmd.exe) in build folder: cmake -DOPENCV_SKIP_PKGCONFIG_GENERATION=ON . Or add this custom variable via cmake-gui ("Add Entry" button).
@alfamousts I fixed it. Just update your code from this repo. It was C API bug in OpenCV 3.x.
@AlexeyAB Thank you so much, you're such an incredible. This code is working.
Hello im using YOLO with version darknet_no_gpu. I have already compiled the program. I have tried object detection using image that already in folder data. But when i try to run using webcam, the demo dialog box it pops up and show the green colour. Later on, the dialog box gone not responding. Also when i am trying using IP cam from my phone camera. I have already put the true my IP camera on the command line, but it shows the same thing. Anyone understand this problem and can give me some solutions to fix this problem ?