Ask Your Question

xMayank's profile - activity

2018-01-31 10:15:13 -0500 received badge  Famous Question (source)
2017-03-14 01:14:35 -0500 received badge  Popular Question (source)
2016-07-13 15:06:55 -0500 received badge  Notable Question (source)
2015-10-16 05:36:02 -0500 received badge  Popular Question (source)
2014-01-20 06:04:42 -0500 commented answer How can I view Live stream from IP camera via internet using opencv?

@Will Stewart: Can you please explain it in simple terms , I have very limited knowledge of Networking.

2014-01-20 04:46:10 -0500 commented answer Error while trying to display video stream from IP camera via Internet

I did not what exactly you are trying to say. I have very limited knowledge of Networking. Please make me understand in simpler terms. Is their any setting needed to be done for accessing the IP camera then please tell me.

2014-01-20 04:37:05 -0500 received badge  Student (source)
2014-01-20 04:36:32 -0500 received badge  Editor (source)
2014-01-20 04:33:58 -0500 asked a question Error while trying to display video stream from IP camera via Internet

I have small code which is able to display the IP camera using its local IP address. But when the camera is used by its Public IP address i am unable to get the live feed.

include "IpCamTest.h"

int main(int, char**) { cv::VideoCapture vcap; cv::Mat image;

// This works on a D-Link CDS-932L
//const std::string videoStreamAddress = "http://aID:password@172.21.10.55:80/video.cgi?resolution=640x360&req_fps=50&.mjpg";
const std::string videoStreamAddress = "http://id:password@192.168.164.41:8088/video.cgi?resolution=640x360&req_fps=50&.mjpg";
//open the video stream and make sure it's opened
if(!vcap.open(videoStreamAddress)) {
    std::cout << "Error opening video stream or file" << std::endl;
    return -1;
}

for(;;) {
    if(!vcap.read(image)) {
        std::cout << "No frame" << std::endl;
        cv::waitKey();
    }
    cv::imshow("Output Window", image);

    if(cv::waitKey(1) >= 0) break;
}

} warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:540) Error opening video stream or file

2014-01-19 21:41:45 -0500 commented question streaming web cam feed over internet

@alanfwilliams: If possible can please share your code for multiple webcam video stream. I have managed to do multiple stream but the when multiple webcam video starts the video starts lagging. I am using MFC, c++

2014-01-19 21:10:41 -0500 asked a question How can I view Live stream from IP camera via internet using opencv?

I want to create an application which can display video stream from IP camera using Opencv and MFC, c++. I am able to get video from my IP camera over the lan, But wondering if its possible via internet.

Code I tried.

int main(int, char**) { cv::VideoCapture vcap; cv::Mat image;

// This works on a D-Link CDS-932L
const std::string videoStreamAddress =

"http://admin:admin@172.41.20.55:80/video.cgi?resolution=640x360&req_fps=50&.mjpg"; //const std::string videoStreamAddress = "http://admin:admin@110.182.164.41:8088/mjpg/video.mjpg";

//open the video stream and make sure it's opened
if(!vcap.open(videoStreamAddress)) {
    std::cout << "Error opening video stream or file" << std::endl;
    return -1;
}

for(;;) {
    if(!vcap.read(image)) {
        std::cout << "No frame" << std::endl;
        cv::waitKey();
    }
    cv::imshow("Output Window", image);

    if(cv::waitKey(1) >= 0) break;
}    }

Get warning "Could not find codec parameter ".

2013-12-17 23:58:04 -0500 asked a question Display live video feed from multiple IP Camera , C++ MFC

I want to display video feed from Multiple IP camera on my network, Currently I am able to display the video feed in picture control in MFC, but the video feed is distrubed when other IP Camera is added. I have coded a timer event where after every 10 milliseconds the QueryFrame for respected camera is called. But the problem is when I add other camera for streaming the video. Either the first IP Camera will disconnect or it will display Frames in slow motion.

2013-12-17 22:07:28 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: Can you give me some guidance on how to display multiple IP camera using OpenCv parallel in single MFC application. Any demo application would be fine or some tutorial. I just wan to take pictures from the live Feed. and store them.

2013-12-17 21:24:37 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: Thanks for taking out time and replying to my question highly appreciate your help. Also i am able to do the streaming, of two IP camera parallel , but am facing problem, when both the camera are giving feed one of the camera stops giving the feed.

2013-12-17 00:36:38 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: I was able to get the stream from My CP-Plus Ip Camera. But for my D-Link Camera when i changed the username,password and Ip in the same link it doesn't work, if you can explain me the problem for the same.

2013-12-17 00:34:49 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: I was able to solve the problem with following code and URL.

include <stdio.h>

include <opencv2/opencv.hpp>

int main(){

CvCapture *camera=cvCaptureFromFile("http://admin:admin@172.41.20.76/axis-cgi/mjpg/video.cgi?resolution=640x480&amp;req_fps=30&amp;.mjpg");
if (camera==NULL)
    printf("camera is null\n");
else
    printf("camera is not null");

cvNamedWindow("img");
while (cvWaitKey(10)!=atoi("q")){
    double t1=(double)cvGetTickCount();
    IplImage *img=cvQueryFrame(camera);
    /*if(img){
        cvSaveImage("C:/opencv.jpg",img);
    }*/
    double t2=(double)cvGetTickCount();
    printf("time: %gms  fps: %.2g\n",(t2-t1)/(cvGetTickFrequency()*1000.), 1000./((t2-t1)/(cvGetTickFrequency()*1000.)));
    cvShowImage("img",img);
2013-12-17 00:20:18 -0500 received badge  Supporter (source)
2013-12-16 23:10:21 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: What do you mean by "Double heck your link" Sorry this may be stupid question but am a new to Opencv

2013-12-16 21:13:59 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: Yes am able to display the video using USB Webcam.

2013-12-16 08:32:27 -0500 commented answer Dynamic display multiple video feed from multiple webcam

Got a new error: Can you please tell me what is it related to ? warning: Could not find codec parameters

(../../modules/highgui/src/cap_ffmpeg_impl.hpp:540)

2013-12-16 07:34:42 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: I get and error saying warning: Error opening file <../../modules/highgui/src/cap_ffmpeg_impl.hpp:529>

2013-12-16 06:53:39 -0500 commented answer Dynamic display multiple video feed from multiple webcam

Here's the code which i tried

include <opencv/cv.h>

include <opencv/highgui.h>

using namespace cv;

int main(int argc, char argv[]) { Mat frame; namedWindow("video", 1); VideoCapture cap; cap.open("http://172.41.20.55:80/video/mjpg.cgi?dummy=.mjpg"); / VideoCapture cap(0);*/ while ( cap.isOpened() ) { cap >> frame; if(frame.empty()) break;

    imshow("video", frame);
    if(waitKey(30) &gt;= 0) break;
}

return 0;

} But I am unable to get the video feed.

2013-12-16 06:50:52 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: I am having problem with getting the live feed from IP Cam. Can you please provide me with a sample code.

2013-11-01 03:14:40 -0500 commented answer Dynamic display multiple video feed from multiple webcam

@Haris Moonamkunnu: I want to access live video feed from IP camera how can i do it, and the same condition goes with this also, i want multipler camera live feed even for IP camera..

2013-10-26 05:03:48 -0500 commented answer Dynamic display multiple video feed from multiple webcam

Thanks mate...Let me try the code..

2013-10-26 00:02:08 -0500 asked a question Dynamic display multiple video feed from multiple webcam

I have implemented code for capturing live video feed from webcam. But the code i have implemented is used 4 cams only. I want to make it dynamic. I.e: If i connect 2 webcam then it should display two windows with live feed. If i connect 3 cams then it should get 3 windows with live feed from all three cameras. I am getting the number of cameras being connected to the system using videoInput.h So now only part is how to make it dynamic for webcam. Here's the code.

int main(){

//Create matrix to store image
Mat image;
Mat image1;
Mat image2;
Mat image3;

//Mat image1;
//initailize capture
videoInput VI;
int numDevices = VI.listDevices();  
VideoCapture cap;
VideoCapture cap1;
VideoCapture cap2;
VideoCapture cap3;

bool x = false;
//VideoCapture cap1;
cap.open(0);
cap1.open(1);
cap2.open(2);
cap3.open(3);

namedWindow("Camera 1",1);
namedWindow("Camera 2",1);
namedWindow("Camera 3",1);
namedWindow("Camera 4",1);

while(1){
    //copy webcam stream to image
    cap >> image;
    cap1 >> image1;
    cap2 >> image2;
    cap3 >> image3;
    cap4 >> image4;
    //cap1 >> image1;
    imshow("Camera 1",image);
    imshow("Camera 2",image1);
    imshow("Camera 3",image2);
    imshow("Camera 4",image3);

    //imshow("Camera 2",image1);
    //delay 33ms
    waitKey(33);
}

}