Image Rotated Rectangle Crop

An enhanced version of matlab's built-in function 'imcrop', supporting rotated rectangles
60 descargas
Actualizado 12 ago 2023

Image Rotated Rectangle Crop

View on File Exchange

Open in MATLAB Online

An enhanced version of matlab's built-in function imcrop, supporting rotated rectangle crop.

Example

srcImg = imread('peppers.png');
cropRect = [260,200,80,200,pi/4];% [centerX,centerY,width,height,yaw]

% crop rotate rectangle image
cropedImg = imgCrop(srcImg,cropRect);

% show result
rect = [cropRect(1:4),cropRect(5)*180/pi];
verticles = getVertices(rect);
p = polyshape(verticles(:,1),verticles(:,2));
figure;imshow(srcImg);hold on; plot(p);title('origin image');

1

figure;imshow(cropedImg);title('cropped image')

2

Citar como

cui,xingxing (2024). Image Rotated Rectangle Crop (https://github.com/cuixingxing150/imageRectCrop/releases/tag/v1.0.1), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2021b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.1

See release notes for this release on GitHub: https://github.com/cuixingxing150/imageRectCrop/releases/tag/v1.0.1

1.0.0

0.0.1

See release notes for this release on GitHub: https://github.com/cuixingxing150/imageRectCrop/releases/tag/v0.0.1

Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.