functionality for compression quality#23
Conversation
christianrauch
left a comment
There was a problem hiding this comment.
See the comments regarding the parameter, format conversion and error handling. For reference, this is the implementation of toCompressedImageMsg that you want to replace: https://github.com/ros-perception/vision_opencv/blob/066793a23e5d06d76c78ca3d69824a501c3554fd/cv_bridge/src/cv_bridge.cpp#L512-L535
It may be easier to just copy it and add the compression parameter to cv::imencode. Or better, send a PR to the vision_opencv repo with that additional parameter :-)
|
From your comments, I can now see that you are essentially reimplementing Do you think re-implemening |
|
Yes it would be sufficient, if it's ok i will copy the function and make the necessary changes and update the pull request. But we still need to call |
|
I tryed to fix all requested changes, if necessary i can go to a new branch with only one commit(if no more issues are present) or let this as it is. |
christianrauch
left a comment
There was a problem hiding this comment.
Apart from my comments, you also have to apply the code style to let the CI pass. You can use the .clang-format with clang-format, or an IDE, to do this automatically.
christianrauch
left a comment
There was a problem hiding this comment.
I am mostly fine with this now. The major thing is now to move this into a function and document its source and license.
christianrauch
left a comment
There was a problem hiding this comment.
Thanks. The code looks much cleaner now. Missing is not only the source and license hint for the function that was copied (compressImageMsg) and a minor style change.
christianrauch
left a comment
There was a problem hiding this comment.
I am still a bit worried about mixing the code with the copied implementation of CvImage::toCompressedImageMsg. Could you move this function either into its own library (cleaner) or into a stand-alone function outside of the CameraNode class (easier)?
|
I'll also try to get a PR in original_repo with additional default parameter to the function. Or with a new signature. May be if they merge we can thane change this too. |
That would be awesome and remove the need to keep this function here. |
christianrauch
left a comment
There was a problem hiding this comment.
This looks good now. Final request: Can you squash all your commits into one and rebase/force-push to the PR? There are many back and forth changes that are better suited for a single commit.
3cd9c48 to
0ec9bd3
Compare
Squashed the final code into the first commit, and changed the commit to "functionality for compression quality". |
bda6689 to
60eb2c1
Compare
|
Thanks :). Yesterday i also tryed to get a PR here in the original |
Implemented paramtric compression quality only if strem from camera is raw, it can be done when the strem from camera is compressed too but i tried to avoid double compression.