Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DIGITAL IMAGE PROCESSING (Matlab) Q) Design in such a way that if a picture of s

ID: 3720083 • Letter: D

Question

DIGITAL IMAGE PROCESSING (Matlab) Q) Design in such a way that if a picture of specific visiting card is already saved in the device (laptop) and your job is to extract the data from it: 1)name 2)Address 3)Number After extracting the specific data, save it in a text boxes or in a text file provided below. NOTE : the following code is to be done on Matlab using DIP techniques, Thank You. DIGITAL IMAGE PROCESSING (Matlab) Q) Design in such a way that if a picture of specific visiting card is already saved in the device (laptop) and your job is to extract the data from it: 1)name 2)Address 3)Number After extracting the specific data, save it in a text boxes or in a text file provided below. NOTE : the following code is to be done on Matlab using DIP techniques, Thank You. DIGITAL IMAGE PROCESSING (Matlab) Q) Design in such a way that if a picture of specific visiting card is already saved in the device (laptop) and your job is to extract the data from it: 1)name 2)Address 3)Number After extracting the specific data, save it in a text boxes or in a text file provided below. NOTE : the following code is to be done on Matlab using DIP techniques, Thank You.

Explanation / Answer

Matlab using DIP techniques:

txt = ocr(I)

txt = ocr(I, roi)

[___] = ocr(___,Name,Value)

recognising the image

businessCard = imread('businessCard.png');
ocrResults = ocr(businessCard)
ocrResults =
ocrText with properties:

Text: '‘ MathWorks®...'
CharacterBoundingBoxes: [103x4 double]
CharacterConfidences: [103x1 single]
Words: {16x1 cell}
WordBoundingBoxes: [16x4 double]
WordConfidences: [16x1 single]

recognizedText = ocrResults.Text;   
figure;
imshow(businessCard);
text(600, 150, recognizedText, 'BackgroundColor', [1 1 1]);
ocrResults =
ocrText with properties:

Text: '‘ MathWorks®...'
CharacterBoundingBoxes: [103x4 double]
CharacterConfidences: [103x1 single]
Words: {16x1 cell}
WordBoundingBoxes: [16x4 double]
WordConfidences: [16x1 single]

recognizedText = ocrResults.Text;   
figure;
imshow(businessCard);
text(600, 150, recognizedText, 'BackgroundColor', [1 1 1]);
roi = [360 118 384 560];
ocrResults = ocr(I, roi);
Iocr = insertText(I,roi(1:2),ocrResults.Text,'AnchorPoint',...
'RightTop','FontSize',16);
figure; imshow(Iocr);
businessCard = imread('businessCard.png');
ocrResults = ocr(businessCard)
ocrResults =
ocrText with properties:

Text: '‘ MathWorks®...'
CharacterBoundingBoxes: [103x4 double]
CharacterConfidences: [103x1 single]
Words: {16x1 cell}
WordBoundingBoxes: [16x4 double]
WordConfidences: [16x1 single]

Iocr = insertObjectAnnotation(businessCard, 'rectangle', ...
ocrResults.WordBoundingBoxes, ...
ocrResults.WordConfidences);
figure; imshow(Iocr);

businessCard = imread('businessCard.png');
ocrResults = ocr(businessCard);
bboxes = locateText(ocrResults, 'MathWorks', 'IgnoreCase', true);
Iocr = insertShape(businessCard, 'FilledRectangle', bboxes);
figure; imshow(Iocr);
I — Input image
M-by-N-by-3 truecolor image | M-by-N 2-D grayscale image | M-by-N binary image