I have a 512x256 image i. I want to get a part similar to the fragment from this image I. how I want I1 512x50 in size.
To take a slice that includes the first 50 columns and all rows, do the following
sliceOfImage = originalImage(:,1:50)
To take a fragment that includes columns 100 to 149, call
sliceOfImage = originalImage(:,100:149)
and etc.
x = [1:50]; % define the scope of x-axis (the "columns") for the portion of the image y = [1:512]; %define the scope of y-axis (the "rows") for the portion of the image I1 = I(x,y,:); % Create I1, the desired portion of the image. Assuming the original image is of RGB and you need to access all 3 colors.
Source: https://habr.com/ru/post/1770172/More articles:Seq.fold and boolean drive - f #Enable / Disable Aero in C # / VB.NET or C ++ Win32 - c ++Python: TKinter frame deletion - pythonC # library for web search and ftp scanner - c #how to draw a button in windows-ce? - c #Is there any other API that will allow real-time audio processing on iOS? - iosFinding a shape created by two other intersecting shapes - c #Where can I find the path to * .jar resources in JNLP? - javaStruts2 shortcut does not include contextPath - javaDrupal: session variable is lost when not registered - drupalAll Articles