Adding 0s and 1s to Bit Data
이전 댓글 표시
I am using imgread to read binary 0,1 data and have to ultimately send it from an FPGA to a monitor using VGA Interface.The entire process would be greatly facilitated if I could add zeros to a 480x640 matrix(had to transpose original 640x480 because fprintf prints column wise ?).I want to know how to write 0 as 000 or 1 as 111 (corresponding to black and white RGB values)?
fid = fopen('3bitbinary.txt','w');
fprintf("","","");
fclose(fid);
Thanks!
채택된 답변
추가 답변 (1개)
Image Analyst
2016년 10월 19일
0 개 추천
Not sure what you're asking, but perhaps you're looking for padarray(). This function will add zeros to a layer around the outside edges of the image, whichever of the 4 sides you specify.
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!