Ask Your Question

naeeem's profile - activity

2015-03-24 16:50:30 -0600 received badge  Famous Question (source)
2014-08-18 05:42:40 -0600 received badge  Notable Question (source)
2014-05-06 18:10:20 -0600 received badge  Popular Question (source)
2013-10-17 04:39:17 -0600 received badge  Scholar (source)
2013-10-16 10:21:47 -0600 commented answer how sent a live stream(UDP) of frames captured by opencv

that solved a major issue for me...can i get ur personal mail id?

2013-10-08 11:38:23 -0600 commented question how sent a live stream(UDP) of frames captured by opencv

well you are correct about me because to your information i started working on networking since 1 month..and i am completely exhuasted since i dont have anyone for guiding me..other than opecv and stack overflow forums..whatever... can we link gstreamer and opencv??

2013-10-08 11:08:54 -0600 commented question how sent a live stream(UDP) of frames captured by opencv

so what do you suggest...i got programs that sent frames captured using v4l2...besides that program can be easily obtained using vlc on server...i want a similar program but with opencv...will it be efficient with tcp ? i heard it causes more delay in frames..is there a way to sent frames in more efficient and faster in UDP??

2013-10-08 10:17:22 -0600 commented answer how sent a live stream(UDP) of frames captured by opencv

i have edited program with your recommendations still there is error..one more thing personel i am also a malayalee from guruvayur...:)

2013-10-06 09:04:29 -0600 asked a question how sent a live stream(UDP) of frames captured by opencv

i created these programs as client and server for broadcasting(UDP) of frames. i got error as segmentation error while running client. code for client

//basic
#include <iostream>
#include <stdio.h>
#include<string.h>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<errno.h>
#include<string.h>
//opencv libraries
#include "opencv2/objdetect.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
//socket libraries
#include<sys/types.h> 
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<netdb.h>
#define SERVERPORT "4950"   // the port users will be connecting to


using namespace std;
using namespace cv;

void detectAndDisplay( Mat frame , Mat frame_edit);// function for detecting face
int talker(Mat frame);
/** Global variables */
String face_cascade_name = "lbpcascade_frontalface.xml";
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
CascadeClassifier face_cascade;
CascadeClassifier eyes_cascade;


/** @function main */
int main( void ) 
{
//body for image capture from camera 
 .
 .
 .
    //calling face detect function
detectAndDisplay( frame_edit, frame );
    int c = waitKey(5);
    if( (char)c == 27 ) { break; } // escape
}
return 0;
}

/**
 * @function detectAndDisplay
 */
 void detectAndDisplay( Mat frame ,Mat frame_edit)
{
// function body for detecting face
    .

imshow( "face detection client", frame );

    //calling talker to sent the data..
int ret=talker(frame);

if(ret==1||ret==2)
{
    cout<<"error";
    exit(1);
}   
}

int talker(Mat frame)

{
int sockfd;
const char *argv[1]={"localhost"};
struct addrinfo hints, *servinfo, *p;
int rv;
int numbytes;
frame = (frame.reshape(0,1)); // to make it continuous
int  imgSize = frame.total()*frame.elemSize();  
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;

if ((rv = getaddrinfo(argv[1], SERVERPORT, &hints, &servinfo)) != 0) 
{
    fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
    return 1;
}
    // loop through all the results and make a socket

for(p = servinfo; p != NULL; p = p->ai_next) 
{
    if ((sockfd = socket(p->ai_family, p->ai_socktype,p->ai_protocol)) == -1) 
    {
        perror("talker: socket");
        continue;
    }
break;
}
if (p == NULL)
{
    fprintf(stderr, "talker: failed to bind socket\n");
    return 2;
}
if ((numbytes = sendto(sockfd, frame.data, imgSize, 0,p->ai_addr, p->ai_addrlen)) == -1)
{
    perror("talker: sendto");
    exit(1);
}
freeaddrinfo(servinfo);
cout<<"senting frame succesfull"<<endl;
close(sockfd);
return 0;
}
2013-09-15 06:04:22 -0600 answered a question cant get logitech c170 working(cant read mjpg)

well i got answer....using tutorials c++ language...

2013-09-11 08:57:38 -0600 commented question cant get logitech c170 working(cant read mjpg)

Driver Info (not using libv4l2): Driver name : uvcvideo Card type : Webcam C170 Bus info : usb-0000:00:1d.0-1.2 Driver version: 3.2.50 Capabilities : 0x04000001 Video Capture Streaming Format Video Capture: Width/Height : 640/480 Pixel Format : 'MJPG' Field : None Bytes per Line: 0 Size Image : 921600 Colorspace : SRGB Crop Capability Video Capture: Bounds : Left 0, Top 0, Width 640, Height 480 Default : Left 0, Top 0, Width 640, Height 480 Pixel Aspect: 1/1 Video input : 0 (Camera 1: ok) Streaming Parameters Video Capture: Capabilities : timeperframe Frames per second: 30.000 (30/1) Read buffers : 0

this is what i get when i entered v4l2-ctl --device=/dev/video0 --all in terminal...its MJPG

2013-09-08 05:38:09 -0600 asked a question cant get logitech c170 working(cant read mjpg)

i tried to run the tutorial code for object detection. i have logitech c170 webcam with me. i am not able to run any tutorial codes with this cam connected.

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP --(!) No captured frame -- Break!

but the same program runs effectively with my built in webcam. since i am a newbie to openCV i am not able to understand the mistakes.

when i took the details of the both cams(built in and logitech c170) using

v4l2-ctl --device=/dev/video0 --all

i got the difference that the pixel formats of both are different. the built in cam is YUYV while logitech is MJPG. more over i am completely unaware of MJPG format..i tried to change the formate to YUYV using

v4l2-ctl --device=/dev/video1 --set-fmt-video=width=640,height=480,pixelformat=0

i could change the format.but when i run the program again the error repeats the format is again changed to MJPG by the system.

consider me as smallest guy in OpenCV...

2013-08-28 20:31:03 -0600 received badge  Editor (source)
2013-08-28 10:25:38 -0600 asked a question --(!)Error loading

well this is my error. image description

2013-07-10 07:26:26 -0600 commented answer couldnt get first program working...

well i moved on to ubuntu...works perfect with no complications...

2013-07-07 22:19:29 -0600 commented answer couldnt get first program working...

well i tried what u suggested...same has occured again...

2013-07-07 22:18:41 -0600 commented answer couldnt get first program working...

in my c:\opencv\include\opencv2\ there is only one .h file!! so how can the compiler link these files ???the files u described above are present c:\opencv\modules...

2013-07-07 11:51:34 -0600 asked a question couldnt get first program working...

following is my error..image description what can i do??

2013-07-07 04:03:32 -0600 commented answer entry to professional programming

fatal error C1083: Cannot open include file: 'highgui.hpp': No such file or directory

all the errors are removed...now only one error...described as above...

2013-07-06 08:12:46 -0600 commented answer entry to professional programming

well my opencv extracted folder doesnt contain lib or bin but inside build folder there are requires folders... to be precise f:\opencv\bin is not available f:\opencv\build\x86\vc10 is available... does that mean i downloaded the wrong file???

2013-07-05 11:26:00 -0600 commented question entry to professional programming

i have been studying the image processing.i have read through basics like matrix manipulation ,smoothing,video profilesetc..will move to pattern recognition soon...well i have ceated programs in arduino (interfaced dualshock 2 controller;eg:https://www.facebook.com/photo.php?v=10151606123929866)...so not much illitrate in programming

well the problem is i cant link the open cv libraries and header file to the program...problem is i cant link the these to visual studio..i have done all the steps as per tutorials..image description

2013-07-05 10:09:07 -0600 asked a question entry to professional programming

i am a engineering(electronics and communication) student..i think of doing a project as part of studies...i think of doing face recognition..but the problem is i am new to this professional level programming..i know basics of c and little more in c++..to be precise i know till i/o from files in c++..beside i did all ma programing in borland c++...

In the beginning as installing the opencv in windows i tried much as explained in the tutorials of this page..i have visual studio 2012..but i did not get even the first program right...i think i cant manipulate the property pages,different mode...so i request u guys to help me with feasible procedures for handling this visual studio..kindly see me as just beginner and help me...