Reading specific region of BMP file

1 view (last 30 days)
Catherine Fung
Catherine Fung on 29 Mar 2017
Commented: Catherine Fung on 29 Mar 2017
Hi guys, I am wondering if there is a way to read just a specific region of BMP files. I know the imread function can do that for .tif file (from the imread example):
A = imread('corn.tif','PixelRegion',{[1,2],[2,5]});
But I want to do that for .bmp
Thanks!

Answers (1)

KSSV
KSSV on 29 Mar 2017
Whatever image format it is....The code you gave works...You can use the same for .bmp also...
  1 Comment
Catherine Fung
Catherine Fung on 29 Mar 2017
Hi KSSV, thanks for replying. I have tried the same code with .bmp but this is what I got:
A = imread('0_8439.bmp','PixelRegion',{[1,2],[2,5]});
Error using imread (line 403)
Too many input arguments.

Sign in to comment.

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!