how can copy data from matrix pointer to matrix variable

asked 2018-11-02 06:10:40 -0600

kishan patel gravatar image

If i have stored data into cv::Mat* frame_pointer. And i can display data using imashow("Frame", *frame);

I have another matrix variable cv::Mat frame. So, how can copy data from frame_pointer to frame?

edit retag flag offensive close merge delete

Comments

please show your code, we can't help without.

berak gravatar imageberak ( 2018-11-02 06:15:19 -0600 )edit

// Main loop while(1) { g_main_iteration(false); //g_main_iteration(true);

    cv::Mat* frame = atomicFrame.load();        

    if(frame) 
    {               
        cv::imshow("Frame", *frame);
        cv::waitKey(1);
    }

}

Here i can display frames, but i want to pass this pointer data to simple variable of matrix.

kishan patel gravatar imagekishan patel ( 2018-11-02 06:23:57 -0600 )edit

I just want to check by copy data from pointer to variable. Please. Here, you can suggest shallow-copy/deep-copy/both. Please.

kishan patel gravatar imagekishan patel ( 2018-11-02 06:31:47 -0600 )edit