Why is an upside down blue image being displayed?

3 vues (au cours des 30 derniers jours)
Shelby
Shelby le 7 Fév 2024
I can't seem to fix my problem. I am trying to inspect an image using OCR to find specific words on an image but when I attempt to use the image I already uploaded this random upside down blue kid shows up out of nowhere. Does something look out of place?
ocrResults = ocr(image);
words = {ocrResults.Words};
searchWords = {'Urgent', 'Important', 'Action required', 'Secured Document'};
highlightedImage = insertObjectAnnotation(image, 'textbox', ocrResults.WordBoundingBoxes, words);
imshow(highlightedImage, 'Parent', app.UIAxes);
detectedWords = intersect(words, searchWords);
if isempty(detectedWords)
app.TextAreaLabel.Text = 'No keywords found';
else
app.TextAreaLabel = 'Keywords found:';
app.TextArea.Value = detectedWords;
end

Réponse acceptée

Image Analyst
Image Analyst le 7 Fév 2024
It comes from image. It is using the built in image function instead of your particular image. Do NOT use "image" as the name of your variable. Call it rgbImage, grayImage, myImage, thisImage, currentImage or anything else other than image.
  1 commentaire
Shelby
Shelby le 7 Fév 2024
Oh got it! Thank you so much!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by