({{, (RefLink[ImageTake, paclet:ref/ImageTake])[image,n] 
gives an image consisting of the first n rows of image.}, {, (RefLink[ImageTake, paclet:ref/ImageTake])[image,-n]
gives an image consisting of the last n rows of image.}, {, (RefLink[ImageTake, paclet:ref/ImageTake])[image,{(Subscript[row, 1]),(Subscript[row, 2])}]
gives rows (Subscript[row, 1]) through (Subscript[row, 2]).}, {, (RefLink[ImageTake, paclet:ref/ImageTake])[image,{(Subscript[row, 1]),(Subscript[row, 2])},{(Subscript[col, 1]),(Subscript[col, 2])}]
gives the image that spans (Subscript[row, 1]) to (Subscript[row, 2]) and (Subscript[col, 1]) to (Subscript[col, 2]).}, {, (RefLink[ImageTake, paclet:ref/ImageTake])[image3d,{(Subscript[slice, 1]),(Subscript[slice, 2])},{(Subscript[row, 1]),(Subscript[row, 2])},{(Subscript[col, 1]),(Subscript[col, 2])}]
gives the 3D image consisting of the specified slices, rows, and columns.}})

OpenersNotesSection(Spacer1)Details

(RefLink[ImageTake, paclet:ref/ImageTake]) is typically used for extracting regions of interest by cropping or trimming an image.

(RefLink[ImageTake, paclet:ref/ImageTake]) uses the standard sequence specification:

If fewer elements exist than are requested, (RefLink[ImageTake, paclet:ref/ImageTake]) will just return the elements that are present.

OpenersPrimaryExamplesSection(Spacer1)Examples  (13)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Take the first 70 pixel rows from an image:

ImageTake[,70]

Take rows 30 through 100 and columns 60 through 130 from an image:

ImageTake[,{30,100},{60,130}]

OpenersExampleSection1(Spacer1)Scope  (4)

OpenersExampleSubsection0(Spacer1)Data  (2)

Take rows 80 to 200 from a grayscale image:

ImageTake[,{80,200}]

Take the top 23 slices of a 3D image:

ImageTake[,23]

OpenersExampleSubsection1(Spacer1)Parameters  (2)

Take the last 100 rows from an image:

i=;

ImageTake[i,-100]

Take rows 30 to 100:

ImageTake[i,{30,100}]

Take row 100:

ImageTake[i,{100}]

Take every other row of the image:

ImageTake[i,{1,-1,2}]

Take the first 100 columns:

ImageTake[i,All, 100]

Take a range of rows and columns:

ImageTake[i, {30, 130},{100,200}]

Take the bottom 23 slices of a 3D image:

i=;
ImageTake[i,-23]

Take a selected horizontal slice of a 3D image:

ImageTake[i,{15}]

Take all slices in a selected region of the 3D image:

ImageTake[i,All,-23,-23]

Take selected part of a 3D volume:

ImageTake[i,{1,20},{26,46},{26,46}]

OpenersExampleSection2(Spacer1)Applications  (2)

Trim an image by removing a 30-pixel-wide border:

ImageTake[,{30,-30},{30,-30}]

Use (RefLink[ImageKeypoints, paclet:ref/ImageKeypoints]) to determine a region of interest:

i=;
{x,y}=Round[MinMax/@Transpose[ImageKeypoints[i,KeypointStrength->0.0001]]]

Highlight the region of interest:

HighlightImage[i,Rectangle@@Transpose[{x,y}]]

Convert from image coordinates to matrix coordinates and extract the region of interest:

ImageTake[i,Sort[250-y],Sort[x]]

OpenersExampleSection3(Spacer1)Properties & Relations  (3)

Use (RefLink[ImageTake, paclet:ref/ImageTake]) to obtain the same top-bottom reflection as with (RefLink[ImageReflect, paclet:ref/ImageReflect]):

ImageTake[,{-1,1}]

Downsample an image by extracting every other pixel:

i=;

ImageTake[i,{1,-1,2},{1,-1,2}]==Downsample[i,2]

Downsample a 3D image by a factor of 3:

i=;
ImageDistance[ImageTake[i,{1,-1,3},{1,-1,3},{1,-1,3}],Downsample[i,3]]

OpenersExampleSection4(Spacer1)Interactive Examples  (2)

Interactive image panning:

image=ExampleData[{"TestImage","Volubilis"}];
Manipulate[ImageTake[image,{pt[[1]],pt[[1]]+200},{pt[[2]],pt[[2]]+200}],{pt,{1,1},Reverse@ImageDimensions[image]-200}]

Interactively take specified parts on a volume:

Manipulate[ImageTake[,{s1,s2},{r1,r2},{c1,c2}],{r1,1,256},{r2,1,256},{c1,1,256},{c2,1,256},{s1,1,99},{s2,1,99}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ImageTrim, paclet:ref/ImageTrim])  ▪  (RefLink[ImageCrop, paclet:ref/ImageCrop])  ▪  (RefLink[ImageData, paclet:ref/ImageData])  ▪  (RefLink[ImagePartition, paclet:ref/ImagePartition])  ▪  (RefLink[Take, paclet:ref/Take])  ▪  (RefLink[ImageReflect, paclet:ref/ImageReflect])  ▪  (RefLink[Downsample, paclet:ref/Downsample])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Image Processing, paclet:tutorial/ImageProcessing])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Image Manipulation, paclet:guide/BasicImageManipulation])}, {▪(RefLinkPlain[Geometric Operations, paclet:guide/ImageGeometry])}})}})