imread() changes dpi resolution
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi,
I want to write a code to apply some processing on a photo. When I right click on the photo on windows I can see in its properties "horizontal resolution 300dpi and vertical resolution 300dpi". I wrote these two lines just to check:
A= imread ('photo.jpg');
imwrite(A,'myphoto.jpg');
When I look at 'myphoto' properties on windows I find that the resolution reduced to 96 dpi. Does imread() change the dpi resolution?
I want to load the image with its original dpi resolution because I want the processed image at then end with that same resolution. I tried (print -r300 myphoto.jpg) but it didn't work. Why does the resolution change? Help me please.
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 10월 4일
imread() does not change the dpi resolution, it just ignores it and returns all of the data that is in the image. imwrite() is the one that is setting the dpi in the output file.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Electromechanical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!