From c5e6e60609fd5c13e1d359980c103314a1d6d28d Mon Sep 17 00:00:00 2001 From: liuyunhui Date: Fri, 10 Oct 2025 21:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Kinect=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NeoKinectUnreal/Private/NeoKinectManager.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/SpaceStudioClient/Plugins/NeoKinectUnreal/Source/NeoKinectUnreal/Private/NeoKinectManager.cpp b/SpaceStudioClient/Plugins/NeoKinectUnreal/Source/NeoKinectUnreal/Private/NeoKinectManager.cpp index d69a056..7644a58 100644 --- a/SpaceStudioClient/Plugins/NeoKinectUnreal/Source/NeoKinectUnreal/Private/NeoKinectManager.cpp +++ b/SpaceStudioClient/Plugins/NeoKinectUnreal/Source/NeoKinectUnreal/Private/NeoKinectManager.cpp @@ -1152,22 +1152,8 @@ void UNeoKinectManager::UpdateFrames() cv::morphologyEx(processedImage, processedImage, cv::MORPH_OPEN, kernel); // 去噪 cv::morphologyEx(processedImage, processedImage, cv::MORPH_CLOSE, kernel); // 填充 cv::GaussianBlur(processedImage, processedImage, cv::Size(5, 5), 1.0); - std::vector> contours; - cv::findContours(processedImage, contours, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE); - std::vector> approxContours(contours.size()); - for (size_t j = 0; j < contours.size(); j++) { - cv::approxPolyDP(contours[j], approxContours[j], 2.0, true); - } - double minArea = 500; // 示例阈值 - for (auto it = approxContours.begin(); it != approxContours.end(); ) { - if (cv::contourArea(*it) < minArea) it = approxContours.erase(it); - else ++it; - } - cv::drawContours(processedImage, approxContours, -1, cv::Scalar(0)); cv::resize(processedImage, processedImage, cv::Size(FrameData.Width, FrameData.Height), 0, 0, cv::INTER_CUBIC); - - RHIUpdateTexture2D( FrameData.Texture->GetRenderTargetResource()->GetRenderTargetTexture(), 0,