dusty-nv / ros_deep_learning

Deep learning inference nodes for ROS / ROS2 with support for NVIDIA Jetson and TensorRT
887 stars 258 forks source link

how I flip the image to mode 4 horizontal? #52

Closed FPSychotic closed 3 years ago

FPSychotic commented 3 years ago

I done it on jetson-inference adding --input-flip=horizontal , as I get mirrored image, but I couldn't find how in the ros node. I guess I need compile that flip mode, and I know how do it in the old fashion in gstcamera.cpp file with " if mode 4 2 etc, but now is "if FLIP_MODE== 180 .... and I dont know what correspond to mode 4 or horizontal, FLIP_MODE==90 or 270 maybe ? I dont know codding sorry.

thanks

dusty-nv commented 3 years ago

It appears that I forgot the flip-method ROS parameter when making the video_source node, sorry about that.

You can manually set your desired flip-method by adding a line like this beneath here:

https://github.com/dusty-nv/ros_deep_learning/blob/ac40e93413f4b7cb911a18c0e4d5daac479234d4/src/node_video_source.cpp#L121

video_options.flipMethod = videoOptions::FLIP_HORIZONTAL;
FPSychotic commented 3 years ago

Fixed, thanks!!