Image Processing to calculate Area
28 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have been working on a series of image processing programs (utilizing imageSegmenter & imageRegionAnalyzer functions) that results in the calculation of an unknown area from a known area on a sheet of paper; squares were used, and have no purpose other than that I can physically measure them, and check the accuracy. Its a simple calculation using the ratios of calculated computed areas (in pixles), to true are of the objects.
I have reached a point where strictly code knowledge is not limiting my accuracy, but rather the method. I have been able to calculate the "unknown' areas with decent accuracy (less than 5%). I need it to be less than 1%, with certainty. This lack of accuracy is due to camera angle(distortion of size between shapes, which can be minimized by taking images directly above the objects), or the fact that my "KNOWN" area (sketched with a sharpie by hand) is larger or smaller than the theoretical "known" size I gave it. I beleive these are the largest sorces of error. My idea is to use some precisely printed shape to be my known area, then use a scanner in place of a cammera.
1) I do believe the scanner idea will eliminate all optical distortion/perspective errors prodiced by a camera and be verry accurate, but am unsure of how to obtain a precisely printed shape. Is there any methods similar to this you could referr me to, so that i can complete this process? Any company that provides precision printing? etc?
2) I'm certain that there are industries for dimiensioning/measuring, or advanced techniques to perform this task (measuring area of "regions" on a 2-D sheet of paper), I am aware of people using a ruler for scale in digital image processing and analysis. Could you point me to code, or methods for this specific task?
Your help is greatly appreciated.
Some simple program I use...
Program 1:
%Stage1_Image_Processing.m
clear;clc;
%1) Read-in Color Image
rgb_im = imread('IMG_Distance_2_Above.png');
%2) Convert to Grayscale
gs_im = rgb2gray(rgb_im);
figure(2); imshow(gs_im);
gs_im_comp = imcomplement(gs_im);
figure(2); imshow(gs_im_comp);
%3) Segment the Image - Separate Items/Colors of Interest from Background
imageSegmenter(gs_im_comp); %OUTPUT
%4) ...Make the output variable name "BW" (for BW image)
% %Go to Analyzer_BW.m code to perform futher operations on BW logic
% variable "image"
Program 2:
%Stage_2_Image_Analyzer_BW
%1) Additional Image Processing - Noise Reduction...
figure;subplot(1,2,1);imshow(BW_D2);title('BW Image')
BW_D2 = imfill(BW_D2,'holes'); %Removes "background"/black specks i.e. dark pixles surrounded by lighter pixles)
subplot(1,2,2);imshow(BW_D2);title('BW Image De-Noised')%Compare Images (zoom in)!
%2) Image Segmentation - Analyze the Binary (BW) photo's regions...
%imageRegionAnalyzer(BW)
imageRegionAnalyzer(BW_D2)
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Convert Image Type in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!