Ask Your Question

txrxmo's profile - activity

2016-03-07 07:29:35 -0500 commented question How to use #include cvcam.h in opencv 3.0?

thanks berak! i shall try that!

2016-03-07 07:29:20 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

@zshn25 thanks i will try it now. As at the moment the only dependencies i include are opencv_ts300d and opencv_world300d and all the codes given to me to run are done using opencv 2.4.

2016-03-07 07:05:57 -0500 received badge  Enthusiast
2016-03-05 08:53:27 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

Hello..i have attached the code i wanted to run in opencv 3.0....i am not sure how as this was only given to me to run it.

2016-03-05 08:52:22 -0500 received badge  Editor (source)
2016-03-03 09:18:11 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

Is there any way i can post a long code?

2016-03-03 09:17:05 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

ifdef _CH_

#pragma package <opencv>
#endif

#ifndef _EiC
#include "cv.h"
#include "cvcam.h"
#include "highgui.h"
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#endif



IplImage *image = 0, *hsv = 0, *hue = 0, *mask = 0, *backproject = 0, *histimg = 0, *plot = 0, *display = 0, *clone = 0;
CvHistogram *hist = 0;

int backproject_mode = 0;
int select_object = 0;
int track_object = 0;
int show_hist = 1;
const int eye_origin = 160;


// Width of boxex across eye
int col5_left = 0;
int col5_right = 0;
int col4_left = 0; //310;
int col4_right = 0; //325;
int col3_left = 0; //330;
int col3_right = 0; //345;
int col2
2016-03-03 09:15:48 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

Okay...i hope you wont mind as the code is super long

2016-03-01 09:56:19 -0500 commented question How to use #include cvcam.h in opencv 3.0?

Alright! thanks! Will do just that

2016-03-01 08:24:41 -0500 commented answer How to use #include cvcam.h in opencv 3.0?

Hello i tried but it did not work

2016-03-01 08:24:19 -0500 commented question How to use #include cvcam.h in opencv 3.0?

Hello! Wil it be okay to post the code? As i am not so familiar with how things work in this forum.

2016-02-29 22:01:41 -0500 asked a question How to use #include cvcam.h in opencv 3.0?

I am trying to run a program that includes the header cvcam.h. It was made with opencv 2.4 but now i am trying to run it with opencv 3.0. For the header #include "highgui.h", i changed it to #include "opencv2/highgui/highgui.hpp". I am not quite sure on how to do it for cvcam.h. I hope someone can help. Thanks! =)

#ifdef _CH_
#pragma package <opencv>
#endif

#ifndef _EiC
#include "cv.h"
#include "cvcam.h"
#include "highgui.h"
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#endif



IplImage *image = 0, *hsv = 0, *hue = 0, *mask = 0, *backproject = 0, *histimg = 0, *plot = 0, *display = 0, *clone = 0;
CvHistogram *hist = 0;

int backproject_mode = 0;
int select_object = 0;
int track_object = 0;
int show_hist = 1;
const int eye_origin = 160;


// Width of boxex across eye
int col5_left = 0;
int col5_right = 0;
int col4_left = 0; //310;
int col4_right = 0; //325;
int col3_left = 0; //330;
int col3_right = 0; //345;
int col2_left = 0; //355;
int col2_right = 0; //370;
int col1_left = 0; //375;
int col1_right = 0; //390;

// Height of boxes across eye
int row1_upper = 0; //262; //317
int row1_lower = 0; //254; //279
int row2_upper = 0; //254; //269
int row2_lower = 0; //246; //231
int row3_upper = 0; //246; //221
int row3_lower = 0; //238; //183 
int row4_upper = 0;
int row4_lower = 0;

//Display numbers
int display_col1 = 10;
int display_col2 = 110;
int display_col3 = 210;
int display_col4 = 310;
int display_col5 = 410;
int display_row1 = 120;
int display_row2 = 240;
int display_row3 = 360;
int display_row4 = 480;

//Display boxes
int box_width = 80;
int box_height = 110;
int box_gapX = 20;
int box_gapY = 10;

//Camera-to-screen ratio
float ratio = 0.118; //camera to eye dist = 6cm, screen to eye dist = 51cm, ratio = 6/51
float scale_width = 0, scale_height = 0, scale_gapX = 0, scale_gapY = 0;
int refresh = 0;
int calibrate = 1;
int EyeCenter_pre = 0;
float scalingX = 1.32; //1.32 for 19", 1 for 15"
float scalingY = 1.13;// 1.13 for 19"
// Data writing
float f;
FILE * pFile;
clock_t delay, time1, time2, time3, time4, timediff_from3, timediff_from2, timediff_from1, track_time;
clock_t time5, time6, time7, time8, time9, time10, time11, time12, time13, START;
clock_t last_time1,last_time2,last_time3,last_time4,last_time5,last_time6,last_time7,last_time8,last_time9,last_time10,last_time11,last_time12,last_time13;
int blank1=1,blank2=1,blank3=1,blank4=1,blank5=1,blank6=1,blank7=1,blank8=1,blank9=1,blank10=1,blank11=1,blank12=1,blank13=1;
float frequency1=2,frequency2=4,frequency3=2,frequency4=8,frequency5=3,frequency6=2,frequency7=9,frequency8=2,frequency9=11,frequency10=4,frequency11=7,frequency12=3,frequency13=1;
time_t rawtime;
clock_t run_start,run_stop;
int running_time=0;
struct tm * timeinfo;
int new_num = 0, pre_num = 0; 
const int eye_threshold = 2;
// get capture parameters.         
int width, height, fps;          
// create video writer for the output.        
CvVideoWriter* writer = NULL; 
int isColor = 1;
int fps     = 5;  // or 30
int frameW  = 640; // 744 for firewire cameras
int frameH  = 480; // 480 for firewire cameras
CvPoint plot_pos;
CvPoint origin;
CvRect selection;
CvRect track_window;
CvBox2D track_box;
CvConnectedComp track_comp;
CvFont font, font1;
CvPoint NewEyeCenter;
CvPoint EllipseCenter;
CvPoint Center;
CvPoint EyeCenter;
int hdims = 16;
float ...
(more)
2016-02-25 11:41:44 -0500 commented question Opening an url in opencv 3.0 with VS 12 C++

@berak I added opencv so reduce the delay to the program

2016-02-25 11:40:35 -0500 commented question Opening an url in opencv 3.0 with VS 12 C++

@berak as i would later consolidate this mouse click with eye tracking program which controls the cursor and with a click on an image, i would need to link it to the internet by going to a url.

2016-02-25 11:30:09 -0500 commented question Opening an url in opencv 3.0 with VS 12 C++

@berak oh my, i didnt know.. thank you for telling me. Is there a possible way to do it in C++ of VS 12?? =(

2016-02-25 11:24:57 -0500 asked a question Opening an url in opencv 3.0 with VS 12 C++

I want to put a mouse click event when I click on the picture a pop up a window and open an internet URL (not an image from the net and not for IP camera). My code for the mouseclick event for left button is as shown.

  if  ( event == EVENT_LBUTTONDOWN )
      {          import urllib;
           cout << "Left button of the mouse is clicked - position (" << x << ", " << y << ")" << endl;
          //Create a window
          namedWindow("My Browser", 1);
          stream=urllib.urlopen('http://google.com')
          imshow("My Browser", stream); 
      }

I thought of using the urlopen function but I am not sure if it is only for opening images from an url. I would like to ask, can i use this method? I hope someone can help me. Thank you.