tailieunhanh - O’Reilly Learning OpenCV phần 6

Phương pháp trung bình về cơ bản học trung bình và độ lệch tiêu chuẩn (hoặc tương tự như vậy, nhưng tính toán nhanh hơn, sự khác biệt trung bình) của mỗi điểm ảnh là mô hình của nền. Hãy xem xét dòng điểm ảnh trong hình 9-1. | Averaging Background Method The averaging method basically learns the average and standard deviation or similarly but computationally faster the average difference of each pixel as its model of the background. ConiiphrlhepixellinefromFigure 9-1. Instead of plotting one sequence of values for each frame as we did in that figure we can represent the variations of each pixel throughout the video in terms of an average and average differences Figure V-2 i In the same video v ioregievindobiael -wdiegcs ieiiact etiand passgs infrunt rf theeamerg. TUat faeegreund object is not nearly as bright as the sky and tree in the background. The C evrtnecs ge the eand e- alev shown in the- figuea. Figure 9-2. Data from Figure 9-1 presented in terms of average differences an object a hand that passes in front of the camera is somewhat darker and the brightness of that object is reflected in the graph The averaging method makes use of four OpenCV routines cvAcc to accumulate images over time cvAbsDiff to accumulate frame-to-frame image differences over time cvInRengeOo to segment the image once a background model has been learned into foreground Iinalbackgesiainrl aagiaose ond codet tb connpila seamabtattone feooe ditfee-Is ia we wmbffakit iefg pieces and réieuse each pirce in uan. Ufrst we aivile pointers for ha curious euratch apd c fC tKs i e a images we win need along theway. tew-fl drove helpful tosort theee po ivteetagcorVtdvtd ahr ype op 0 1 011 1 wiii taler heid. tPSPc bt l tirese e a Float 3-channel images I IsIP ììì le g - - ilprneF ISiF eiiewf Background Subtraction I 271 Ipllmage Iscratch Iscratch2 Float 1-channel images Ipllmage Igrayl Igray2 Igray3 Ipllmage Ilowl Ilow2 Ilow3 IplImage Ihit Ihi2 hhi3 lyae 1-ihannel image Ipllmage Imaskt hpCouats nhmyer 0 o hmyghs Ỉ3ywi id for averaging later. hp float Icount veniencews paua in a single image from our video that can be used as a reference for sizing the intermediate images. IP y g i a P U ii for sizing void AlleclteImeges

TỪ KHÓA LIÊN QUAN