导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. bsx3
    3. 楼层
    B
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    bsx3 发布的帖子

    • openmv可以追小球,有什么办法可以追人?

      红外热成像之类的可以实现吗?如果可以,怎么用openmv实现?

      发布在 OpenMV Cam
      B
      bsx3
    • openmv可以import cv2.cv吗?

      opencv-Python可以在openmv上使用吗?

      发布在 OpenMV Cam
      B
      bsx3
    • openmv识别的阈值不精确怎么办?

      用openmv的阈值编辑器对手掌的图片进行调整,肤色的阈值好像和墙壁接近。如果背景是墙壁,经常识别到墙壁,而且方框一直闪烁,识别到不同位置。该怎么解决肤色阈值的问题。openmv的肤色取值是不是和opencv的hsv颜色模型的原理类似。
      我的肤色阈值:hand_threshold = (85, 49, -8, 81, -81, 76)。

      发布在 OpenMV Cam
      B
      bsx3
    • TensorFlow训练的模型是.pb文件,怎么转换为cascade文件?openmv有提供相应的转换工具吗?

      TensorFlow训练的模型是.pb文件,怎么转换为cascade文件?openmv有提供相应的转换工具吗?

      发布在 OpenMV Cam
      B
      bsx3
    • opencv中的代码如何在openmv里实现?

      比如说opencv里凸包检测的算法,要调用到opencv的头文件和函数,在openmv里要怎么实现?

       #include "opencv2/imgproc/imgproc.hpp"
       #include <iostream>
       #include <stdio.h>
       #include <stdlib.h>
      
       using namespace cv;
       using namespace std;
      
       Mat src; Mat src_gray;
       int thresh = 100;
       int max_thresh = 255;
       RNG rng(12345);
      
       /// Function header
       void thresh_callback(int, void* );
      
      /** @function main */
      int main( int argc, char** argv )
       {
         /// Load source image and convert it to gray
         src = imread( argv[1], 1 );
      
         /// Convert image to gray and blur it
         cvtColor( src, src_gray, CV_BGR2GRAY );
         blur( src_gray, src_gray, Size(3,3) );
      
         /// Create Window
         char* source_window = "Source";
         namedWindow( source_window, CV_WINDOW_AUTOSIZE );
         imshow( source_window, src );
      
         createTrackbar( " Threshold:", "Source", &thresh, max_thresh, thresh_callback );
         thresh_callback( 0, 0 );
      
         waitKey(0);
         return(0);
       }
      
       /** @function thresh_callback */
       void thresh_callback(int, void* )
       {
         Mat src_copy = src.clone();
         Mat threshold_output;
         vector<vector<Point> > contours;
         vector<Vec4i> hierarchy;
      
         /// Detect edges using Threshold
         threshold( src_gray, threshold_output, thresh, 255, THRESH_BINARY );
      
         /// Find contours
         findContours( threshold_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) );
      
         /// Find the convex hull object for each contour
         vector<vector<Point> >hull( contours.size() );
         for( int i = 0; i < contours.size(); i++ )
            {  convexHull( Mat(contours[i]), hull[i], false ); }
      
         /// Draw contours + hull results
         Mat drawing = Mat::zeros( threshold_output.size(), CV_8UC3 );
         for( int i = 0; i< contours.size(); i++ )
            {
              Scalar color = Scalar( rng.uniform(0, 255), rng.uniform(0,255), rng.uniform(0,255) );
              drawContours( drawing, contours, i, color, 1, 8, vector<Vec4i>(), 0, Point() );
              drawContours( drawing, hull, i, color, 1, 8, vector<Vec4i>(), 0, Point() );
            }
      
         /// Show in a window
         namedWindow( "Hull demo", CV_WINDOW_AUTOSIZE );
         imshow( "Hull demo", drawing );
       }
      
      

      来源:https://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/hull/hull.html#hull0_1556421588698_Hull_Original_Image.jpg 0_1556421607161_Hull_Result.jpg

      发布在 OpenMV Cam
      B
      bsx3
    • openmv中检测笑脸的神经网络smile.network是怎么制作的?怎么制作属于自己的神经网络模型?

      怎么制作属于自己的神经网络模型?例如识别手掌的模型。

      发布在 OpenMV Cam
      B
      bsx3
    • 哪位有识别手掌的分类器cascade文件或者xml文件?我自己训练的识别精度好低。

      哪位有识别手掌的分类器cascade文件或者xml文件可以分享?我自己训练的分类器识别精度好低。

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 使用自己的cascade文件,但是错误提示找不到文件怎么办?

      代码如下可正常运行

      hand_cascade = image.HaarCascade("hand.cascade", stages=25)
      
      发布在 OpenMV Cam
      B
      bsx3
    • 使用自己的cascade文件,但是错误提示找不到文件怎么办?

      我把我的cascade文件放到openmv的根目录下,修改代码为

      hand_cascade = image.HaarCascade("hand", stages=25)
      

      但还是显示找不到文件怎么办?
      OSError: Could not find the file

      发布在 OpenMV Cam
      B
      bsx3
    • 人脸检测要用到的HaarCascade存放在哪里?

      人脸检测里face_cascade=image.HaarCascade("frontalface", stages=25)这行代码里的frontalface存放在哪里?
      如果要使用自己的HaarCascade文件应该存放在哪里?

      发布在 OpenMV Cam
      B
      bsx3
    • RE: openmv有一个HaarCascade 类 – 特征描述符,可以检测人脸或其他特征,所以可以用这个类来实现手势识别?

      如果是自己训练一个呢,用opencv先做好识别手势的Haar分类器,然后把原本openmv调用识别人脸的分类器换做识别手势的。

      发布在 OpenMV Cam
      B
      bsx3
    • openmv有一个HaarCascade 类 – 特征描述符,可以检测人脸或其他特征,所以可以用这个类来实现手势识别?

      有没有已经做好的手势识别的OpenCV Haar Cascade可以分享?

      发布在 OpenMV Cam
      B
      bsx3
    • openmv能不能通过分割图片,进行图片的特征点检测来识别手势?

      👐

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 追踪色块时,小车转角过大,可能是什么原因造成的?

      硬件:电机25GA370直流减速电机,tb6612驱动芯片,电源模块,电池,openmv
      0_1555732263202_小车.jpg

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 识别手掌及五个手指的形状要用什么方法?

      leap motion好贵呀

      发布在 OpenMV Cam
      B
      bsx3
    • 追踪色块时,小车转角过大,可能是什么原因造成的?
      # Blob Detection Example
      #
      # This example shows off how to use the find_blobs function to find color
      # blobs in the image. This example in particular looks for dark red objects.
      
      import sensor, image, time#导入感光元件,图像,时钟模块
      import car
      from pid import PID
      
      # You may need to tweak the above settings for tracking red things...
      # Select an area in the Framebuffer to copy the color settings.
      
      #常规设置
      sensor.reset() # Initialize the camera sensor.重置图像分辨率
      sensor.set_pixformat(sensor.RGB565) # use RGB565.设置图像为RGB565,彩色
      sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
      sensor.skip_frames(10) # Let new settings take affect.跳过几帧,使以上设置生效
      sensor.set_auto_whitebal(False) # turn this off.设置白平衡关闭;颜色识别时,要关闭白平衡,避免影响识别
      clock = time.clock() # Tracks FPS.跟踪快照之间经过的毫秒数
      
      
      
      # For color tracking to work really well you should ideally be in a very, very,
      # very, controlled enviroment where the lighting is constant...
      
      #设置图像阈值,根据需要修改
      blue_threshold   = (52, 13, 34, -3, -26, -51)
      
      '''
      标准参数;
      作用是如果摄像头检测到的小球的色块的像素点数>2000的话,说明我们的小车距离我们的小球很近
      >2000,就使小车后退一点,和小球保持一段距离
      <2000,就使小车追踪这个小车
      
      '''
      size_threshold = 2000   #自定义
      
      
      #x_pid是方向pid,控制电机的方向
      #如果小车转动的角度过大,可以调整'p'参数小一点
      #???只传入p, i参数,imax代表???
      x_pid = PID(p=0.2, i=1, imax=100)
      
      
      #h_pid是距离pid,控制小车的速度
      #如果小车的速度过快,可以调整'p'参数小一点
      
      h_pid = PID(p=0.02, i=0.1, imax=50)
      
      
      #find_max函数找到视野中面积最大的小球
      #在视野中出现不止一个小球,找到面积最大,即最近的小球;
      def find_max(blobs):
          max_size=0
          for blob in blobs:
              if blob[2]*blob[3] > max_size:
                  max_blob=blob
                  max_size = blob[2]*blob[3]
          return max_blob
      
      while(True):
          clock.tick() # Track elapsed milliseconds between snapshots().跟踪快照之间经过的毫秒数
      
          #从sensor中截取一段图像
          img = sensor.snapshot() # Take a picture and return the image.
      
          #调用颜色识别的函数
          blobs = img.find_blobs([blue_threshold])
          if blobs:   #如果找到色块
              max_blob = find_max(blobs)#找到最大的色块去追踪
              #pid的差值,用于计算后面pid的参数
              x_error = max_blob[5]-img.width()/2
              h_error = max_blob[2]*max_blob[3]-size_threshold
              print("x error: ", x_error)
      
              '''
              for b in blobs:
                  # Draw a rect around the blob.
                  img.draw_rectangle(b[0:4]) # rect
                  img.draw_cross(b[5], b[6]) # cx, cy
              '''
      
              img.draw_rectangle(max_blob[0:4]) # rect 在找到的色块上划矩形
              img.draw_cross(max_blob[5], max_blob[6]) # cx, cy 在找到的色块上划十字
      
              #通过传参给pid函数,得到结果,放回控制小车的参数
              x_output=x_pid.get_pid(x_error,1)#传入误差值和积分参数
              h_output=h_pid.get_pid(h_error,1)
      
              print("h_output",h_output)
      
              #小车的距离pid一致,方向pid相反
              car.run(-h_output-x_output,-h_output+x_output)
      
          #未找到色块则慢速原地旋转,寻找四周的色块
          else:
              car.run(0,0)
      

      代码主要是教程里的,改了几个参数而已。
      在追踪色块时,我固定好蓝色色块,让小车靠近,然后PID控制的时候有点奇怪,小车会偏向右边(或左边)直到固定的色块不在镜头范围内。

      我的电机是12v620转的。

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 识别手掌及五个手指的形状要用什么方法?

      0_1555669689136_op.png
      如果使用人脸检测里的训练方法是否能解决?要怎样做呢?

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 识别手掌及五个手指的形状要用什么方法?

      搜索了之前的答案,openmv没有识别手掌形状的算法,那识别轮廓有没有什么其他可行的办法?

      发布在 OpenMV Cam
      B
      bsx3
    • 识别手掌及五个手指的形状要用什么方法?

      openmv可以支持手势识别吗?
      不过我只需要openmv识别到手掌和五个手指张开这样一个形状要用什么方法实现呢?

      发布在 OpenMV Cam
      B
      bsx3
    • RE: 调试人脸识别时出现问题,tuple' object has no attribute 'cx'该怎么解决?

      谢谢,这个问题解决了。不过在人脸上画方框用到 img.draw_rectangle(max_blob.rect())时出现问题, img.find_features没有rect()的方法,该用哪个方法代替。

      发布在 OpenMV Cam
      B
      bsx3