box detection/rectangle detection
8 次查看(过去 30 天)
显示 更早的评论
Hi
Here is my sample image. How to automatically grab/crop/know the region of each colour square without using 'get rect' function?
0 个评论
采纳的回答
Image Analyst
2021-11-24
There is a function for this: colorChecker()
Attached is a full demo.
5 个评论
Roger Breton
2024-1-30
I tried your "Test.m" code and still got the same error message: "Color patches were not detected."?
% Read in image that has a Color Checker chart in it but that has unknown image capture conditions.
% fileName = 'colorCheckerTestImage.jpg';
fileName = 'CC24 in Scene JPEG.jpg';
rgbImage = imread(fileName);
更多回答(1 个)
yanqi liu
2021-11-25
clc; clear all; close all;
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/812319/image.jpeg';
img = imread(filename);
% use colorChecker
chart = colorChecker(img);
displayChart(chart)
% use measureColor
[colorTable, ccm] = measureColor(chart);
figure;
displayColorPatch(colorTable); set(gcf, 'units','normalized','position',[0,0,1,1])
colorTable
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!