日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
基于HTML5的人臉識(shí)別技術(shù)

然后打開下面地址:

創(chuàng)新互聯(lián)公司主營北流網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,成都app開發(fā),北流h5微信小程序搭建,北流網(wǎng)站營銷推廣歡迎北流等地區(qū)企業(yè)咨詢

http://neave.com/webcam/html5/face/

當(dāng)你搖頭晃腦的時(shí)候,那副眼鏡會(huì)跟著移動(dòng)并幫你戴上眼鏡。

你可以查看網(wǎng)頁源碼來了解具體的實(shí)現(xiàn)細(xì)節(jié)。

———————————–我是分界線———————————————

這是一篇國外的文章,介紹如何通過 WebRTC、OpenCV 和 WebSocket 技術(shù)實(shí)現(xiàn)在 Web 瀏覽器上的人臉識(shí)別,架構(gòu)在 Jetty 之上。

實(shí)現(xiàn)的效果包括:

還能識(shí)別眼睛

人臉識(shí)別的核心代碼:

頁面:

XML/HTML Code
復(fù)制內(nèi)容到剪貼板

  
 
 
 
  1.  
  2.  
  3.  
 
  •  
  • JavaScript Code
    復(fù)制內(nèi)容到剪貼板

      
     
     
     
    1. publicclass FaceDetection {   
    2. privatestaticfinal String CASCADE_FILE ="resources/haarcascade_frontalface_alt.xml";   
    3. privateint minsize = 20;   
    4. privateint group = 0;   
    5. privatedouble scale = 1.1;   
    6. /**  
    7. * Based on FaceDetection example from JavaCV.  
    8. */ 
    9. publicbyte[] convert(byte[] imageData) throws IOException {   
    10. // create image from supplied bytearray 
    11. IplImage originalImage = cvDecodeImage(cvMat(1, imageData.length,CV_8UC1, newBytePointer(imageData)));   
    12. // Convert to grayscale for recognition 
    13. IplImage grayImage = IplImage.create(originalImage.width(), originalImage.height(), IPL_DEPTH_8U, 1);   
    14. cvCvtColor(originalImage, grayImage, CV_BGR2GRAY);   
    15. // storage is needed to store information during detection 
    16. CvMemStorage storage = CvMemStorage.create();   
    17. // Configuration to use in analysis 
    18. CvHaarClassifierCascade cascade = newCvHaarClassifierCascade(cvLoad(CASCADE_FILE));   
    19. // We detect the faces. 
    20. CvSeq faces = cvHaarDetectObjects(grayImage, cascade, storage, scale, group, minsize);   
    21. // We iterate over the discovered faces and draw yellow rectangles around them. 
    22. for (int i = 0; i < faces.total(); i++) {   
    23. CvRect r = new CvRect(cvGetSeqElem(faces, i));   
    24. cvRectangle(originalImage, cvPoint(r.x(), r.y()),   
    25. cvPoint(r.x() + r.width(), r.y() + r.height()),   
    26. CvScalar.YELLOW, 1, CV_AA, 0);   
    27. }   
    28. // convert the resulting image back to an array 
    29. ByteArrayOutputStream bout = new ByteArrayOutputStream();   
    30. BufferedImage imgb = originalImage.getBufferedImage();   
    31. ImageIO.write(imgb, "png", bout);   
    32. return bout.toByteArray();   
    33. }   
    34. }   

    原文鏈接:http://www.html5china.com/course/20120528_3742.html


    網(wǎng)頁題目:基于HTML5的人臉識(shí)別技術(shù)
    地址分享:http://www.dlmjj.cn/article/djoeeci.html