Hi I found the solution in this post I had to use the Copy() function to solve the “Must own the data to send it.” issue.
Here is the working code :
auto inputL = rx_input_imageL().getProto();
ImageConstView3ub input_imageL;
bool okL = FromProto(inputL.getImage(), rx_input_imageL().buffers(), input_imageL);
ASSERT(okL, "Failed to deserialize the input image L");
auto outputL = tx_output_imageL().initProto();
outputL.setCols(1280);
outputL.setRows(960);
Image3ub output_imageL(960,1280);
Copy(input_imageL,output_imageL);
ToProto(std::move(output_imageL), outputL, tx_output_imageL().buffers());
tx_output_imageL().publish(rx_input_imageL().acqtime());