Identify same words

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Identify same words

Ana Gleice Santos
Hi everyone,

I have a problem to resolve with Octave Online. I want to identity in text some words into the text: "t" and "p", but I am not getting. 

Could you help me?

Thank you,
Ana Gleice 



text.png (27K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Identify same words

nrjank
On Mon, Nov 18, 2019 at 2:52 PM Ana Gleice Santos <[hidden email]> wrote:
Hi everyone,

I have a problem to resolve with Octave Online. I want to identity in text some words into the text: "t" and "p", but I am not getting. 

Could you help me?


can you provide the mailing list with an example of the code you are currently trying to use, along with the error messages/results you're currently getting?  


Reply | Threaded
Open this post in threaded view
|

Re: Identify same words

Ana Gleice Santos
close all
clear all

mask = imread('text.png');
imshow(mask);

letra1 = imread('t_paint.png');
se1 = logical(letra1(:,:,1));
se1(2,:)  = 0; % todo os elemntos da 2a linha iguais a 0
se1(17,:) = 0; % todo os elemntos da 17a linha iguais a 0
se1(:,2) = 0; % todo os elemntos da 2a coluna iguais a 0
se1(:,3) = 0; % todo os elemntos da 3a coluna iguais a 0
se1(:,6) = 0; % todo os elemntos da 6a coluna iguais a 0
se1(:,7) = 0; % todo os elemntos da 7a coluna iguais a 0
se1(:,8) = 0; % todo os elemntos da 8a coluna iguais a 0


% Marcador
marker1 = imerode(mask,se1);

% Reconstrução da imagem com os objetos selecionados pelo marcador
ir1 = imreconstruct(marker1,mask);
figure
imshow(ir1)
pause


% 1.1 Try identifiy word  "t";
se2 = logical(letra1(:,:,1));
se2(2,:)  = 0; % todo os elemntos da 2a linha iguais a 0
se2(17,:) = 0; % todo os elemntos da 17a linha iguais a 0
se2(:,8) = 0; % todo os elemntos da 8a coluna iguais a 0
se2(4,3) = 0;
se2(4,6) = 0;

marker2 = imerode(mask,se2);

ir2 = imreconstruct(marker2,mask);
figure
imshow(ir2)

Em seg., 18 de nov. de 2019 às 17:21, Nicholas Jankowski <[hidden email]> escreveu:
On Mon, Nov 18, 2019 at 2:52 PM Ana Gleice Santos <[hidden email]> wrote:
Hi everyone,

I have a problem to resolve with Octave Online. I want to identity in text some words into the text: "t" and "p", but I am not getting. 

Could you help me?


can you provide the mailing list with an example of the code you are currently trying to use, along with the error messages/results you're currently getting?  


Reply | Threaded
Open this post in threaded view
|

Re: Identify same words

nrjank
mask = imread('text.png');
imshow(mask);

letra1 = imread('t_paint.png');


you attached the text.png image  to the first email, but not the 't_paint.png', so we cannot try the code.  

what results or errors do you get, and what are you trying to do?