xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 0M
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-06
  • 語言: 其他
  • 標(biāo)簽: 其他??

資源簡(jiǎn)介

main.zip

資源截圖

代碼片段和文件信息

‘‘‘
有用的視覺算法都試一試
‘‘‘
import?sensor?image?time
from?pyb?import?LED
from?pyb?import?Pin
from?pyb?import?UART
import?sys

#######外設(shè)初始化區(qū)#######
uart?=?UART(3?115200)
uart.init(115200?bits=8?parity=None?stop=1)??#?串口初始化
pin3?=?Pin(‘P3‘?Pin.IN?Pin.PULL_UP)???????????#?P3作為IO口,低電平作為開始讀色環(huán)的依據(jù)
pin6?=?Pin(‘P6‘Pin.INPin.PULL_DOWN)???????????#?P6串口發(fā)送給單片機(jī)
led_green?=?LED(1)??????????????????????????????#?綠燈
led_blue?=?LED(2)???????????????????????????????#?藍(lán)燈

#######攝像頭初始化區(qū)#######
sensor.reset()
sensor.set_pixformat(sensor.RGB565)?????????????#?彩色
sensor.set_framesize(sensor.QVGA)?????????????????#?分辨率
sensor.skip_frames(time?=?600)
sensor.set_auto_whitebal(False)
sensor.set_auto_gain(False)#?白平衡值恒為(-5-6-4)
clock?=?time.clock()????????????????????????????#?系統(tǒng)時(shí)鐘

#######曝光值定義區(qū)#######
expo_circle=2000????????????#?色環(huán)曝光值?暗一點(diǎn)有利于識(shí)別
#######標(biāo)志位變量定義區(qū)#######
i?=?1???????????????????????#?全局,控制階段數(shù)012追蹤顏色?3發(fā)送顏色順序?4二維碼識(shí)別與發(fā)送?5無?6色環(huán)
circles?=?0?????????????????#?色環(huán)階段,第幾個(gè)圓圈
red_timesgreen_timesblue_times?=?000?#色環(huán)階段,記錄紅綠藍(lán)的次數(shù)
level?=?0???????????????????#?色環(huán)階段是高電平還是低電平
#######順序變量定義區(qū)#######
circle_order?=?0????????????#?色環(huán)顏色的順序
#######大小變量定義區(qū)#######
blob_size?=?300?????????????#?尋找色塊的最小值?find_blobs?函數(shù)的?pixel_threshold?和?area_threshold
pixel_size?=?10???????????????????#?尋找色環(huán)的最小像素單位

#######函數(shù)定義區(qū)#######
#?發(fā)送物塊的顏色順序,用小寫abcdef來表示順序
def?send_blob(blob_order):
????if?blob_order?==?1230:
????????uart.write(“a“)?????????#?當(dāng)順序是紅綠藍(lán),發(fā)送字母a
????????print(‘a(chǎn)‘)
????if?blob_order?==?1320:
????????uart.write(“b“)
????????print(‘b‘)
????if?blob_order?==?2130:
????????uart.write(“c“)
????????print(‘c‘)
????if?blob_order?==?2310:
????????uart.write(“d“)
????????print(‘d‘)
????if?blob_order?==?3120:
????????uart.write(“e“)
????????print(‘e‘)
????if?blob_order?==?3210:
????????uart.write(“f“)
????????print(‘f‘)
#?發(fā)送二維碼的順序值,用大寫ABCDEF表示順序
def?send_code(code_order):
????if?code_order?==?123:
????????uart.write(“A“)
????if?code_order?==?132:
????????uart.write(“B“)
????if?code_order?==?213:
????????uart.write(“C“)
????if?code_order?==?231:
????????uart.write(“D“)
????if?code_order?==?312:
????????uart.write(“E“)
????if?code_order?==?321:
????????uart.write(“F“)
#亮燈函數(shù)
def?cyan_on():
????led_green.on()
????led_blue.on()
def?green_on():
????led_green.on()
????led_blue.off()
def?blue_on():
????led_green.off()
????led_blue.on()
def?off():
????led_green.off()
????led_blue.off()


red_threshold?=?[20?28?36?44?11?29]
red_threshold_dim?=?[11?20?25?35?4?21]
red_threshold_bright?=?[9?19?21?33?1?21]

green_threshold?=?[40?53?-49?-41?27?41]
green_threshold_dim?=?[21?30?-35?-25?18?33]
green_threshold_bright?=[14?29?-30?-16?8?27]

blue_threshold?=?[6?15?-7?10?-27?-8]
blue_threshold_dim?=?[12?23?8?24?-49?-32]
blue_threshold_bright?=?[12?21?-7?11?-32?-12]

red_color_code?=?1?#?code?=?2^0?=?1
green_color_code?=?2?#?code?=?2^1?=?2
blue_color_code=4?#code=

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????15185??2019-05-18?15:38??main.py

評(píng)論

共有 條評(píng)論