@@ -160,7 +160,7 @@ class llm_task {
160160 cv::Mat camera_data (mode_config_.img_h , mode_config_.img_w , CV_8UC2, (void *)msg.data ());
161161 cv::Mat rgb;
162162 cv::cvtColor (camera_data, rgb, cv::COLOR_YUV2RGB_YUYV);
163- return inference (rgb, false );
163+ return inference (rgb, true );
164164 }
165165
166166 bool inference_raw_rgb (const std::string &msg)
@@ -195,13 +195,14 @@ class llm_task {
195195 int ret = -1 ;
196196 std::vector<uint8_t > image (mode_config_.img_w * mode_config_.img_h * 3 , 0 );
197197 common::get_input_data_no_letterbox (src, image, mode_config_.img_h , mode_config_.img_w , bgr2rgb);
198+ cv::Mat img_mat (mode_config_.img_h , mode_config_.img_w , CV_8UC3, image.data ());
198199 depth_anything_->SetInput ((void *)image.data (), 0 );
199200 if (0 != depth_anything_->RunSync ()) {
200201 SLOGE (" Run depth_anything model failed!\n " );
201202 throw std::string (" depth_anything_ RunSync error" );
202203 }
203204 std::vector<detection::Object> objects;
204- depth_anything_->Post_Process (src , mode_config_.model_type );
205+ depth_anything_->Post_Process (img_mat , mode_config_.model_type );
205206 std::vector<nlohmann::json> depth_anything_output;
206207 if (out_callback_) out_callback_ (depth_anything_output, true );
207208 } catch (...) {
0 commit comments