Ask Your Question

10350's profile - activity

2020-08-27 09:02:13 -0600 received badge  Popular Question (source)
2015-07-10 06:34:58 -0600 commented answer find the differences between two images pixel I want to show on the screen with imshow method How can I do

I dont use ready function So how do I write algorithm

2015-07-10 06:32:28 -0600 answered a question find the differences between two images pixel I want to show on the screen with imshow method How can I do

But I dont use ready function.So how Do you algorithm

2015-07-08 05:13:42 -0600 asked a question find the differences between two images pixel I want to show on the screen with imshow method How can I do
 Mat difference(Mat frame1, Mat frame2)
{
    Mat image = frame1.clone();


    for (int rows = 0; rows < image.rows; rows++)
    {
        for (int cols = 0; cols < image.cols; cols++)
        {

            image.at<cv::Vec3b>(rows, cols)[0] = abs(frame1.at<cv::Vec3b>(rows, cols)[0] -
                frame2.at<cv::Vec3b>(rows, cols)[0]);
            image.at<cv::Vec3b>(rows, cols)[1] = abs(frame1.at<cv::Vec3b>(rows, cols)[1] -
                frame2.at<cv::Vec3b>(rows, cols)[1]);
            image.at<cv::Vec3b>(rows, cols)[2] = abs(frame1.at<cv::Vec3b>(rows, cols)[2] -
                frame2.at<cv::Vec3b>(rows, cols)[2]);
        }
    }
    return image;
}
int main()
{

    Mat src = imread(file name);
    Mat curr_frame = imread(file name);
    Mat image = src.clone();
    cout << image.rows;
    cout << image.cols;
 differenceFrame(src, curr_frame);


 system("pause");

}