图像识别的基本方法与参考

图像比较的基本方法:

(1)颜色(color)

  • histograms
  • moments

(2)纹理(texture)

  • LBPs
  • textons
  • Haralick

(3)形状(shape)

  • Hu moments
  • Zernike moments

(3)形状(shape)

  • Hu moments
  • Zernike moments

文章:

图像去重:(MSC、SSIM)http://www.pyimagesearch.com/2014/09/15/python-compare-two-images/

图像fingerprinting:https://realpython.com/blog/python/fingerprinting-images-for-near-duplicate-detection/

图像模板匹配(template matching):http://machinelearningmastery.com/using-opencv-python-and-template-matching-to-play-wheres-waldo/

实时图像feature探测:http://www.pyimagesearch.com/2014/12/15/real-time-barcode-detection-video-python-opencv/

图像Histograms:http://www.pyimagesearch.com/2014/01/27/hobbits-and-histograms-a-how-to-guide-to-building-your-first-image-search-engine-in-python/

动画识别(motion detection):http://www.pyimagesearch.com/2015/06/01/home-surveillance-and-motion-detection-with-the-raspberry-pi-python-and-opencv/

Serial port control solution alternatives

1) pexpect

官网:
https://github.com/pexpect

示例:

fd = os.open("/dev/ttyS0", os.O_NONBLOCK|os.O_RDWR|os.O_NOCTTY)
th = pexpect.fdpexpect.fdspawn(fd)
th.expect(["stuff", pexpect.TIMEOUT], 5)

2) python streamexpect

官网:
https://github.com/digidotcom/python-streamexpect

示例:

import serial
import streamexpect

# timeout=0 is essential, as streams are required to be non-blocking
ser = serial.Serial('COM1', baudrate=115200, timeout=0)

with streamexpect.wrap(ser) as stream:
stream.write('\r\nuname -a\r\n')
match = stream.expect_bytes('Linux', timeout=1.0)
print(u'Found Linux at index {}'.format(match.start))