Hi, everybody ! i need sourecode c++.. please help me.. thank you so much !!
1 | initial version |
Hi, everybody ! i need sourecode c++.. please help me.. thank you so much !!
2 | No.2 Revision |
Hi, everybody !
i need sourecode c++.. please help me..
used Background Subtraction using running average, but i can't runnn !
thank you so much !!
using namespace cv;
int main() {
VideoCapture cap(0); // open the default camera
if (!cap.isOpened()) // check if we succeeded
return -1;
// Variables
Mat frame;
Mat accumulator;
Mat scaled;
// Initialize the accumulator matrix
accumulator = Mat::zeros(frame.size(), CV_32FC3);
while (1) {
// Capture frame
cap >> frame;
// Get 50% of the new frame and add it to 50% of the accumulator
accumulateWeighted(frame, accumulator, 0.5);
// Scale it to 8-bit unsigned
convertScaleAbs(accumulator, scaled);
imshow("Original", frame);
imshow("Weighted Average", scaled);
waitKey(1);
}
}
3 | No.3 Revision |
Hi, everybody ! i used Background Subtraction using running average, but i can't runnn ! thank you so much !!
using namespace cv;
int main() {
VideoCapture cap(0); // open the default camera
if (!cap.isOpened()) // check if we succeeded
return -1;
// Variables
Mat frame;
Mat accumulator;
Mat scaled;
// Initialize the accumulator matrix
accumulator = Mat::zeros(frame.size(), CV_32FC3);
while (1) {
// Capture frame
cap >> frame;
// Get 50% of the new frame and add it to 50% of the accumulator
accumulateWeighted(frame, accumulator, 0.5);
0.5); //error in hereeeeee!
// Scale it to 8-bit unsigned
convertScaleAbs(accumulator, scaled);
imshow("Original", frame);
imshow("Weighted Average", scaled);
waitKey(1);
}
}
4 | No.4 Revision |
Hi, everybody ! i used Background Subtraction using running average, but i can't runnn ! thank you so much !!
#include "opencv2/opencv.hpp"
}
5 | No.5 Revision |
Hi, everybody ! i used Background Subtraction using running average, but i can't runnn ! thank you so much !!
#include "opencv2/opencv.hpp"
using namespace cv;
int main()
{
VideoCapture cap(0); // open the default camera
if (!cap.isOpened()) // check if we succeeded
return -1;
// Variables
Mat frame;
Mat accumulator;
Mat scaled;
// Initialize the accumulator matrix
accumulator = Mat::zeros(frame.size(), CV_32FC3);
while (1) {
// Capture frame
cap >> frame;
// Get 50% of the new frame and add it to 50% of the accumulator
accumulateWeighted(frame, accumulator, 0.5); //error in hereeeeee!
// Scale it to 8-bit unsigned
convertScaleAbs(accumulator, scaled);
imshow("Original", frame);
imshow("Weighted Average", scaled);
waitKey(1);
}
}
}