Items with no label
3338 討論

I want to extract information(depth, object name) from 'dnn' in real time as text

지최
初學者
2,242 檢視

I use realsense d415 and use 'dnn' code https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/dnn librealsense/wrappers/opencv/dnn at master · IntelRealSense/librealsense · GitHub

The information(depth, object name) is displayed on the screen

But!! I want to save this information in some format such such as text at the same time

To do this, I need to modify 'rs-dnn.cpp' code

How do I fix the code??

0 積分
4 回應
idata
員工
1,131 檢視

Hello jiin,

 

 

Thank you for your interest in the Intel RealSense Technology.

 

 

In regards to your query, if you look at the details below you can see that the code that outputs the depth information to the label on the screen begins on line 125 ( https://github.com/IntelRealSense/librealsense/blob/master/wrappers/opencv/dnn/rs-dnn.cpp# L125 ) rectangle(color_mat, Rect(Point(center.x, center.y - labelSize.height), Size(labelSize.width, labelSize.height + baseLine)), Scalar(255, 255, 255), CV_FILLED); putText(color_mat, ss.str(), center, FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0,0,0));

 

You can replace this with code to output to a file instead. The depth data is stored in the variable: ss.str()

 

 

Let me know if this proves helpful, or if I can assist you with anything else.

 

 

Best regards,

 

Casandra
지최
初學者
1,131 檢視

Does that mean I need to modify the code in line 125?

idata
員工
1,131 檢視

Hello jiin,

 

 

Yes, you can replace this with code to output to a file instead on line 125. The depth data is stored in the variable: ss.str()

 

 

Please let me know if I can assist with anything else.

 

 

Regards,

 

Casandra
idata
員工
1,131 檢視

Hello jiin,

 

 

Was the solution provided helpful, is there anything else I can assist you with?

 

 

Best regards,

 

Casandra
回覆