6 #include <opencv2/core/core.hpp> 7 #include <opencv2/highgui/highgui.hpp> 31 is_camera_beingused(false), is_file_beingused(false)
35 is_camera_beingused(
false), is_file_beingused(
false)
39 is_camera_beingused(
false), is_file_beingused(
false)
43 is_camera_beingused(
false), is_file_beingused(
false)
47 is_camera_beingused(
false), is_file_beingused(
false)
49 CommonImage(
const uchar *
data,
int width,
int height, Format format, QImageCleanupFunction cleanupFunction,
void *cleanupInfo) :
50 QImage(data, width, height, format, cleanupFunction, cleanupInfo),
51 is_camera_beingused(
false), is_file_beingused(
false)
53 CommonImage(
const uchar *data,
int width,
int height,
int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction,
void *cleanupInfo) :
54 QImage(data, width, height, bytesPerLine, format, cleanupFunction, cleanupInfo),
55 is_camera_beingused(
false), is_file_beingused(
false)
58 QImage(width, height, format),
59 is_camera_beingused(
false), is_file_beingused(
false)
61 CommonImage(uchar *data,
int width,
int height, Format format, QImageCleanupFunction cleanupFunction,
void *cleanupInfo) :
62 QImage(data, width, height, format, cleanupFunction, cleanupInfo),
63 is_camera_beingused(
false), is_file_beingused(
false)
65 CommonImage(uchar *data,
int width,
int height,
int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction,
void *cleanupInfo) :
66 QImage(data, width, height, bytesPerLine, format, cleanupFunction, cleanupInfo),
67 is_camera_beingused(
false), is_file_beingused(
false)
70 CommonImage(
const QString &fileName,
const char *format);
75 using QImage::operator =;
80 static cv::Mat formatconv_QT2CV_YUV(
const QImage input);
103 void cleanseCommonImageData();
104 void cleanseQImageData(
int w = 0,
int h = 0, Format fmt = QImage::Format_Invalid);
108 cv::VideoCapture vcapturer;
110 std::string capt_filename;
112 bool is_camera_beingused;
113 bool is_file_beingused;
114 bool is_mat_beingedited;
122 #endif // COMMONIMAGE_H CommonImage()
CommonImage Derived from all the QImage constructors.
Definition: commonimage.h:29
CommonImage & operator=(const cv::Mat input)
CommonImage::operator = A much more comfortable alias for convertFromMat.
Definition: commonimage.cpp:343
bool captureFromVideoFile(std::string fn)
CommonImage::captureFromVideoFile Opens a video file to grab images with grabCap(). If a file or a camera is currently being used, it is released.
Definition: commonimage.cpp:238
static QImage formatconv_CV2QT(const cv::Mat &input)
CommonImage::formatconv_CV2QT Copies a CV Mat data to a new QImage.
Definition: commonimage.cpp:63
cv::Mat toCVYUVMat()
CommonImage::toCVYUVMat Copies and transforms this image data to a cv::Mat with a YUV (YCrCb) colorsp...
Definition: commonimage.cpp:201
void closeCap()
CommonImage::closeCap If a camera or video file is being used, it is closed.
Definition: commonimage.cpp:271
void cleanseQImageData(int w=0, int h=0, Format fmt=QImage::Format_Invalid)
CommonImage::cleanseQImageData This function is intended to resize and clean all the QImage data...
Definition: commonimage.cpp:313
bool captureFromCamera(int device)
CommonImage::captureFromCamera Opens the camera to grab images with grabCap(). If a file or a camera ...
Definition: commonimage.cpp:216
static cv::Mat formatconv_QT2CV(const QImage input)
CommonImage::formatconv_QT2CV Copies a QImage data into a new OpenCV Mat.
Definition: commonimage.cpp:94
void applyCVMask(const cv::Mat &mask)
CommonImage::applyCVMask Applies a binary mask to this image.
Definition: commonimage.cpp:173
cv::Mat toCVMat()
CommonImage::toCVMat Copies this image data to a new allocated cv::Mat, which is returned.
Definition: commonimage.cpp:160
The CommonImage class This is a class made to solve the headache you'll probably get when working bot...
Definition: commonimage.h:21
int getCaptureFPS()
CommonImage::getCaptureFPS Shows how many Frames Per Seconds does the captured media play...
Definition: commonimage.cpp:366
int getCaptureFrameInterval()
CommonImage::getCaptureFrameInterval Shows the interval in milliseconds between two consecutive frame...
Definition: commonimage.cpp:380
void convertFromMat(const cv::Mat &input)
CommonImage::convertFromMat Copies the data from a cv::Mat. [I've got my doubts on whether this funct...
Definition: commonimage.cpp:283
~CommonImage()
CommonImage::~CommonImage Takes a broom and <s>takes everything it finds below a carpet</s> cleans ev...
Definition: commonimage.cpp:407
bool captureSkipToTime(double secs)
CommonImage::captureSkipToTime If capturing from a video file, this allows to skip to a video time...
Definition: commonimage.cpp:394
double getCaptureAttribute(int propid)
CommonImage::getCaptureAttribute Retrieves some attribute from the Video Capturer.
Definition: commonimage.cpp:355
Definition: BackgroundRecLigth.h:20