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

資源簡介

下位機的攝像頭獲取到圖像數(shù)據(jù),通過發(fā)送到上位機,上位機用matlab接收數(shù)據(jù)并顯示出來,本代碼實現(xiàn)了RGB565,RGB888,灰度圖,二值化圖的顯示

資源截圖

代碼片段和文件信息

%?function?finalTest(~~)
delete(instrfindall);
g=serial(‘com4‘);

g.InputBufferSize=153600;

g.timeout=50;

g.BaudRate=115200;

g.Parity=‘none‘;

g.StopBits=1;

g.Terminator=‘LF‘;
%?TimerA=timer(‘timerfcn‘@TimerFunA‘StartDelay‘45‘executionmode‘‘fixedrate‘);
%?start(TimerA);

fopen(g);%打開串口設備對象s
fwrite(g255);%以二進制方式發(fā)送握手信號0xFF,缺省為異步通信方式
out=fread(g153600‘uint8‘);

%%%%%%%%%%%接受RGB565轉(zhuǎn)換成RGB888顯示%%%%%%%%%%%%%
i=1;j=0;str=[];
while?i<=length(out)
????j=j+1;
????str(j)=out(i+1)+out(i)*256;
????i=i+2;
end

A=reshape(str320240);
imgR?=?uint8((255/31).*bitshift(bitand(A?63488)?-11));??%?Red?component
imgG?=?uint8((255/63).*bitshift(bitand(A?2016)?-5));????%?Green?component????

評論

共有 條評論