orl face data download

本文分享了OpenCV ORL人脸数据集的百度网盘下载链接及提取码,为计算机视觉研究者提供便利。

orl_data_face下载

给大家分享opencv orl data face:
链接:https://pan.baidu.com/s/1hmP7UCMfM4Lv1BSsGewfYQ
提取码:w6xw

# Face recognition with LBP descriptors. # See Timo Ahonen's "Face Recognition with Local Binary Patterns". # # Before running the example: # 1) Download the AT&T faces database http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip # 2) Exract and copy the orl_faces directory to the SD card root. import sensor, time, image from pyb import UART from machine import LED led = LED("LED_BLUE") for i in range(3): led.on() time.sleep_ms(500) led.off() time.sleep_ms(500) # 鍒濆?嬪寲鎽勫儚澶翠紶鎰熷櫒 sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others) sensor.set_windowing((92,112)) sensor.skip_frames(10) # Let new settings take affect. sensor.skip_frames(time = 5000) #绛夊緟5s # 鍒濆?嬪寲涓插彛 uart=UART(3,115200) #SUB = "s1" NUM_SUBJECTS = 3 #鍥惧儚搴撲腑涓嶅悓浜烘暟锛屼竴鍏?3浜? NUM_SUBJECTS_IMGS = 20 #姣忎汉鏈?20寮犳牱鏈?鍥剧墖 # 鎷嶆憚褰撳墠浜鸿劯銆? img = sensor.snapshot() #img = image.Image("singtown/%s/1.pgm"%(SUB)) d0 = img.find_lbp((0, 0, img.width(), img.height())) #d0涓哄綋鍓嶄汉鑴哥殑lbp鐗瑰緛 img = None pmin = 999999 num=0 def min(pmin, a, s): global num if a<pmin: pmin=a num=s return pmin for s in range(1, NUM_SUBJECTS+1): dist = 0 for i in range(2, NUM_SUBJECTS_IMGS+1): img = image.Image("singtown/s%d/%d.pgm"%(s, i)) d1 = img.find_lbp((0, 0, img.width(), img.height())) #d1涓虹?瑂鏂囦欢澶逛腑鐨勭?琲寮犲浘鐗囩殑lbp鐗瑰緛 dist += image.match_descriptor(d0, d1)#璁$畻d0 d1鍗虫牱鏈?鍥惧儚涓庤??妫€娴嬩汉鑴哥殑鐗瑰緛宸?寮傚害銆? print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS)) pmin = min(pmin, dist/NUM_SUBJECTS_IMGS, s)#鐗瑰緛宸?寮傚害瓒婂皬锛岃??妫€娴嬩汉鑴镐笌姝ゆ牱鏈?鏇寸浉浼兼洿鍖归厤銆? print(pmin) print(num) # num涓哄綋鍓嶆渶鍖归厤鐨勪汉鐨勭紪鍙枫€? # 鏍煎紡锛氳捣濮嬪瓧鑺? + 浜虹墿缂栧彿 + 缂栧彿锛?1瀛楄妭锛? + 缁撴潫瀛楄妭 start_byte = 0xAA end_byte =0x55 data = num data_packet=bytes([start_byte,num,end_byte]) uart.write(data_packet) print("Sent packet with markers:", [start_byte,num,end_byte]) # led = LED(1) led = LED("LED_RED") for i in range(3): led.on() time.sleep_ms(500) led.off() time.sleep_ms(500) 这个编码乱码要怎么改
最新发布
10-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值