MATLAB HELP ME for read all images in a directory and put logo to the right top corner in all images
조회 수: 2 (최근 30일)
이전 댓글 표시
read all files in a matlab directory and then place logo to the right top corner in all images i want help to instructors MAtlab users thanks in advance
댓글 수: 0
답변 (1개)
Peyman Ghasemi
2017년 10월 3일
Hi Tehmoor;
I wrote a code for you. I think it is useful for you in concept.
logo = imread('logo.jpg'); %read logo
dinfo = dir('*.jpg'); %find jpg files in the directory
for K = 1 : length(dinfo)
imName = dinfo(K).name; %name of the file
a = imread(imName); %read the image
a(size(a,1)-size(logo,1)+1:end,1:size(logo,2),:) = logo; %add logo
imwrite(a,[imName(1:end-4),'_withLOGO.jpg']) %save image in the same directory with '_withLOGO' added to the name
end
Regards; Peyman
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!