box detection/rectangle detection
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Salad Box
am 24 Nov. 2021
Kommentiert: Roger Breton
am 30 Jan. 2024
Hi
Here is my sample image. How to automatically grab/crop/know the region of each colour square without using 'get rect' function?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 24 Nov. 2021
There is a function for this: colorChecker()
Attached is a full demo.
5 Kommentare
Roger Breton
am 30 Jan. 2024
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);
Weitere Antworten (1)
yanqi liu
am 25 Nov. 2021
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
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!