How to find the number of letters in the image?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    betty
 el 6 de En. de 2022
  
    
    
    
    
    Respondida: yanqi liu
      
 el 7 de En. de 2022
            how do I find out how many letters are in the image below and print them on the image?

1 comentario
  Walter Roberson
      
      
 el 6 de En. de 2022
				I know the three dots is the Morse Code for the letter 'S', but in Braille it would be '31' which is a different number of characters, so I don't think thise question has an actual answer.
Respuesta aceptada
  yanqi liu
      
 el 7 de En. de 2022
        clc; clear all; close all;
img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/855210/image.png');
figure; imshow(img);
bw = im2bw(img);
bw = imclose(bw, strel('line', 3, 90));
bw = bwareaopen(bw, 17);
[~,num] = bwlabel(bw);
img2 = insertText(img, [3 size(img,1)*0.8], sprintf('find %d letters',num),'FontSize',18,'BoxColor',...
    'r','BoxOpacity',0.8,'TextColor','white');
figure; imshow(img2);
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Convert Image Type en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




