How to extract rectangular patches from a rotated rectangle?
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have to extract LBP features from a rotated rectangle section of an image. Since the extractLBPFeatures function takes as an input a NxM matrix, I thought about rotating my image to get an axis aligned rectangle. In the case of the image below I still get slanted edges because parts of the rectangle are out of the image.
So I though about creating small axis aligned rectangular patches to cover the maximum possible area of the rotate rectangle. I wasn't able to find such an alghoritm. Do you know any implementations?
Do you have any other idea how to extract the LBP features from the rotated rectangle?
Thank you in advance!
M
0 个评论
回答(2 个)
Kuifeng
2016-4-5
% top figure
% 1. edge finding, find the two parallel long lines
% 2. use polyfit to fit the slope of the longer line
% 3. draw the lines passing the top corner perpendicular to long line
% note Slope_longEdge * Slope_shortEdge = -1;
Image Analyst
2016-4-5
Attached is my demo of local binary pattern of an image. Adapt as needed.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!