Python OpenCV如何改善SIFT输出?

发布于 2025-01-21 06:42:44 字数 406 浏览 3 评论 0原文

        train_image = 'train_image location'
        sift = cv2.SIFT_create() 
        gray = cv2.cvtColor(train_image, cv2.COLOR_BGR2GRAY)
        (kp, descs) = sift.detectAndCompute(gray, None)
      

我为火车型号提供了39,209个流量标志图片的数据集。当我尝试从他们那里获得筛选功能3131时无法创建desc。在尝试调整此代码有问题的图像大小后,

resized = cv2.resize(train_image,(256,256))

数字从3131下降到2613。更好的 ?

        train_image = 'train_image location'
        sift = cv2.SIFT_create() 
        gray = cv2.cvtColor(train_image, cv2.COLOR_BGR2GRAY)
        (kp, descs) = sift.detectAndCompute(gray, None)
      

I have a dataset of 39,209 traffic sign pictures for my train model. When i try to get SIFT features from them 3131 of the pictures were unable to create descs.After that i tried resize the images that had problems with this code

resized = cv2.resize(train_image,(256,256))

The number went from 3131 down to 2613. What can i else do to make the SIFT better ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秋风の叶未落 2025-01-28 06:42:44
              resized = cv2.resize(roi_image,(256,256))
              alpha = 2.5 # Contrast control (1.0-3.0)
              beta = 50 # Brightness control (0-100)
              adjusted = cv2.convertScaleAbs(resized, alpha=alpha, beta=beta)
              sift = cv2.SIFT_create() 
              gray = cv2.cvtColor(adjusted, cv2.COLOR_BGR2GRAY)
              (kp, descs) = sift.detectAndCompute(gray, None)

我发现改变亮度和对比可能会有所帮助。
麻烦的数据从2613下降到Araound 300。

              resized = cv2.resize(roi_image,(256,256))
              alpha = 2.5 # Contrast control (1.0-3.0)
              beta = 50 # Brightness control (0-100)
              adjusted = cv2.convertScaleAbs(resized, alpha=alpha, beta=beta)
              sift = cv2.SIFT_create() 
              gray = cv2.cvtColor(adjusted, cv2.COLOR_BGR2GRAY)
              (kp, descs) = sift.detectAndCompute(gray, None)

I found out that changing the brightness and contrast could help.It made the
troublesome data go down from 2613 to araound 300.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文