How to save image data in shared pointer
Dear Developers,
Whether there is any way I can save image data from Mat object to "std::shared_ptr<char> newFramePointer".
For example I read image as follows : Mat newFrame = cv::imread("NewFrame.png");
and now how do i save data in newFrame into a shared pointer "newFramePointer"
Many Thanks for Help :)
what do you need it for ?
who will own the data in which step of your program ?
will it need copies, and when ?
@berak thank you very much for your fast reply.
Actually, one module of our OpenCV software will be developed by another company and they want me to pass newFrame image to their software module in following format:
So that later in their module they can reconstruct image using following instruction.
So can you please inform me how can I convert image in Mat object to std::shared_ptr<char>& newFrame_dat ?
Please inform me if you need any other information from me.
Many thanks :)
see also https://answers.opencv.org/question/1...
i just deleted the prev. answer, because it was wrong.
never thought about shared_ptr deleting objects.
can you take a look at https://en.cppreference.com/w/cpp/mem... ?
you have 2 concurring refcounted pixel containers, and that's a terrible idea