Skip to content
Snippets Groups Projects
Commit 0e7060a0 authored by marwan's avatar marwan
Browse files

bug due to UINT8 data type resolved

parent 4f39d5a0
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,9 @@ function xout=jrp(varargin)
% $Revision$
%
% $Log$
% Revision 2.2 2005/04/15 09:02:32 marwan
% minor bugfix in plugin section
%
% Revision 2.1 2005/04/08 09:54:19 marwan
% plugin added
%
......@@ -509,7 +512,7 @@ switch(action)
if nogui == 1, disp('(plugin used)'), end
[X1 matext] = crp_plugin(x2, x2, 1, 1, e, mflag, hCRP, plugin_path, 0);
[X2 matext] = crp_plugin(y2, y2, 1, 1, e, mflag, hCRP, plugin_path, 0);
X = uint8(X1)' .* uint8(X2)'; clear X1 X2
X = uint8(X1' .* X2)'; clear X1 X2
else
% use builtin implementation
......@@ -566,7 +569,7 @@ switch(action)
X1=sx<e;
X2=sy<e;
if check_stop(hCRP,hCtrl,nogui,obj), return, end
X = uint8(X1)' .* uint8(X2)'; clear s s1 s2 sx sy x1 y1 px py X1 X2
X = uint8(X1' .* X2)'; clear s s1 s2 sx sy x1 y1 px py X1 X2
%%%%%%%%%%%%%%%%% local JRP, normalized distance euclidean norm
......@@ -605,7 +608,8 @@ switch(action)
if check_stop(hCRP,hCtrl,nogui,obj), return, end
set(findobj('Tag','Status','Parent',findobj('Parent',hCRP,'Tag','CRPPlot')'),'String','Building JRP Matrix'),drawnow
X=(uint8(255*sx/max(sx(:)))<(255*e/max(sx(:))))' .* (uint8(255*sy/max(sy(:)))<(255*e/max(sy(:))))'; clear sx sy s1 x1 y1 px py
X=uint8( (255*sx/max(sx(:)))<(255*e/max(sx(:)))' .* (255*sy/max(sy(:)))<(255*e/max(sy(:)))' );
clear sx sy s1 x1 y1 px py
matext=[num2str(round(100*e)/100) '\sigma (normalized distance euclidean norm)'];
......@@ -645,7 +649,7 @@ switch(action)
JJ=JJ';
if check_stop(hCRP,hCtrl,nogui,obj), return, end
X1(NX*NX)=uint8(0); X1(JJ(:,1:mine)+repmat([0:NX:NX*NX-1]',1,mine))=uint8(1);
X1(NX*NX)=0; X1(JJ(:,1:mine)+repmat([0:NX:NX*NX-1]',1,mine))=1;
set(findobj('Tag','Status','Parent',findobj('Parent',hCRP,'Tag','CRPPlot')),'String','Reshape Embedding Vectors (2)'),drawnow
......@@ -666,12 +670,12 @@ switch(action)
JJ=JJ';
if check_stop(hCRP,hCtrl,nogui,obj), return, end
X2(NY*NY)=uint8(0); X2(JJ(:,1:mine)+repmat([0:NY:NY*NY-1]',1,mine))=uint8(1);
X2(NY*NY)=0; X2(JJ(:,1:mine)+repmat([0:NY:NY*NY-1]',1,mine))=1;
set(findobj('Tag','Status','Parent',findobj('Parent',hCRP,'Tag','CRPPlot')),'String','Building JRP Matrix'),drawnow
if check_stop(hCRP,hCtrl,nogui,obj), return, end
X=reshape(X1,NX,NX) .* reshape(X2,NY,NY); clear X1 X2 SS JJ s px py
X=uint8(reshape(X1,NX,NX) .* reshape(X2,NY,NY)); clear X1 X2 SS JJ s px py
matext=[num2str(round(1000*mine/NY)/10) '% (fixed neighbours amount)'];
......@@ -720,7 +724,7 @@ switch(action)
for i=1:min(NX,NX),
if check_stop(hCRP,hCtrl,nogui,obj), return, end
JJx((JJx(1:mine,i)>min(NX,NX)),i)=1;
X1(i,JJx(1:mine,i))=sy(i,JJx(1:mine,i))<=e(i);
X1(i,JJx(1:mine,i))=(sy(i,JJx(1:mine,i))<=e(i))';
end
......@@ -741,6 +745,7 @@ switch(action)
set(findobj('Tag','Status','Parent',findobj('Parent',hCRP,'Tag','CRPPlot')),'String','Sort Distance Matrix (2)'),drawnow
mine=round(min(NY,NY)*e);
mine(~mine) = 1;
[SSx, JJx]=sort(sx);%SSx(1,:)=[]; JJx(1,:)=[];
if check_stop(hCRP,hCtrl,nogui,obj), return, end
[SSy, JJy]=sort(sy);%SSy(1,:)=[]; JJy(1,:)=[];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment