Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
SecurityCam - WatchPoint.h

WatchPoint.h

Caricato da: Carlduke
Scarica il programma completo

  1. #ifndef WATCHPOINT_H
  2. #define WATCHPOINT_H
  3.  
  4. #include <cv.h>
  5. #include <cxcore.h>
  6. #include <highgui.h>
  7. #include <iostream>
  8.  
  9. #include "Box.h"
  10. #include "Image.h"
  11. #include "Timer.h"
  12.  
  13. using namespace std;
  14.  
  15. class WatchPoint : public Box
  16. {
  17.   public :
  18.           WatchPoint(IplImage *_image,CvPoint p1,CvPoint p2);
  19.           ~WatchPoint();
  20.  
  21.           void flip_image(IplImage *img);
  22.           void set_tolerance(float t);
  23.           int get_tolerance(){ return tolerance; }
  24.           void set_motion_image(IplImage *img);
  25.           void improve_quality(bool called_by_movement = false);
  26.           void set_fliptime(int time);
  27.           int get_fliptime(){ return fliptime; }
  28.  
  29.           bool movement();
  30.  
  31.   protected :
  32.           bool motion;
  33.           bool improvement_has_been_made;
  34.           int improvement_level;
  35.  
  36.           float tolerance;
  37.  
  38.           IplImage *ipl_initial_image;
  39.           IplImage *ipl_current_image;
  40.           IplImage *on_motion_image;
  41.  
  42.           std::string window_name;
  43.           static int total_watch_point;
  44.           int current_watch_point;
  45.  
  46.           void draw(IplImage *img1,IplImage *img2,IplImage *img3);
  47.  
  48.           void createRgbImage(RgbImage &initial_image,RgbImage &current_image);
  49.  
  50.           static Timer *timer;
  51.           int spawn_sec;
  52.           int fliptime;
  53.  
  54.           cv::VideoWriter *writer;
  55.  
  56.           int counter;
  57.  
  58. };
  59.  
  60.  
  61. #endif