how to shrink a image to fit in a screen for further image processing?

2 visualizaciones (últimos 30 días)
am trying to do charcter recognintion from a scanned image(ocr).,for that i need to segment line by line.,so i used imcrop function but i got an Warning: "Image is too big to fit on screen; displaying at 56% scale." because i cannot able to do properly., please give some solution for this?

Respuesta aceptada

Image Analyst
Image Analyst el 2 de Nov. de 2011
There is no solution necessary! Don't worry about it. Simply ignore it. It won't affect your processing of the underlying image, which is always at full resolution. It only affects the display. If you want, you can zoom the displayed image with the zoom command but it isn't necessary unless the user really needs to have it magnified in order to visually inspect some area.

Más respuestas (2)

Amith Kamath
Amith Kamath el 2 de Nov. de 2011
If you intend to resize the image at the cost of resolution, you need to use imresize, but if you want to keep the resolution, but plot just the parts that you want to see, then you can say imshow(<part of the 2D image matrix you want to see>), for example:
I = imread('rice.png');
imshow(I(1:100,1:100)) %to show only the first 100x100 pixels in the image.

Image Analyst
Image Analyst el 2 de Nov. de 2011
Here's an example I coded up yesterday to turn off a warning. Pay special attention to the directions in the comments for how to find the error ID for your particular situation:
% When the image is zoomed, there is a warning message that gets spit out to the command window.
% Turn off this warning:
% Warning: An error occurred during the mode callback.
% > In uitools.uimode.modeWindowButtonDownFcn at 95
% In uitools.uimode.modeControl>localModeWindowButtonDownFcn at 151
% To set the warning state, you must first know the message identifier for the one warning you want to enable.
% Query the last warning to acquire the identifier. For example:
% warnStruct = warning('query', 'last');
% msgid_integerCat = warnStruct.identifier
% msgid_integerCat =
% MATLAB:uitools:uimode:callbackerror
warning('off', 'MATLAB:uitools:uimode:callbackerror');

Community Treasure Hunt

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

Start Hunting!

Translated by