Fwd: SIP Window - Mogrify rotate

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Fwd: SIP Window - Mogrify rotate

by Ricardo Fabbri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

---------- Forwarded message ----------
From: Emmanuel de Bilbao <emmanuel.debilbao@...>
Date: Jul 19, 2006 2:45 AM
Subject: Re: SIP Window - Mogrify rotate
To: Ricardo Fabbri <rfabbri@...>



 Thanks for your help.
 I don't know if it could be interested, i wrote a short script for "A
rank based edge enhancement filter" (attached file) used for pixel
calibration.
 For more details, see :


Pixel Calibration Techniques. DG Bailey. Proc. of the New Zealand
Image and Vision Computing, 95 Workshop, Lincoln, pp 37-42 (August
1995)
A rank based edge enhancement filter. DG Bailey. Proc 5th New Zealand
Image Processing Workshop (August 1990)
http://sprg.massey.ac.nz/Proj_operations.html
 Regards.
 Emmanuel de Bilbao.

 Ricardo Fabbri a écrit :
Use the "string" function (help string)

 hope it helps,

 On 7/5/06, Emmanuel de Bilbao <emmanuel.debilbao@...> wrote:

Dear Mr Fabbri,
 I use scilab with SIP to analyse image and I need to rotate it.
 So I used mogrify function and it runs with these syntax :
 bmatr=mogrify(bmat,['-rotate','10']); like the demo
 BUT it doesn't run with :
 AngRotV=-180*atan((abvl+abvr)/2)/%pi;
 bmatr=mogrify(bmat,['-rotate','AngRotV']);

 Is anythere a solution to define the rotation angle with a variable.

 Regards.

 Emmanuel de Bilbao.






// ******************************************************************
// RBENFilter
// RANK BASED EDGE ENHANCEMENT FILTER
//*******************************************************************
//
// Function : [Im]=RBENFilter(ImIn,rh,rl)
// Input Image ImIn
// Output Image : Im
// Rank filter : 9> rh > rl >1
//
// Filter matrix 3*3

function [f]=filt(matric)
  f=zeros(1,9);mtemp=matric;
  for rf=1:9
    g=min(mtemp);
    [I,J]=find(mtemp<=g);
    f(rf)=mtemp(I(1),J(1));
    mtemp(I(1),J(1))=300;
  end
endfunction

function [v]=ENF9(matric,rh,rl)
  f=filt(matric);
  if abs(f(rh)-matric(2,2))>abs(f(rl)-matric(2,2)) then v=f(rl); end;
  if abs(f(rh)-matric(2,2))<=abs(f(rl)-matric(2,2)) then v=f(rh); end;
endfunction

function [Im]=RBENFilter(ImIn,rh,rl)
  [Nl,Nc]=size(ImIn);
  Im=ImIn;
  for i=2:Nl-1
    for j=2:Nc-1
      mask=ImIn(i-1:i+1,j-1:j+1);
      Im(i,j)=ENF9(mask,rh,rl);
    end
  end
endfunction





--
Ricardo Fabbri

PhD Student in Computer Engineering / Computer Vision
LEMS - Laboratory for Engineering Man-Machine Systems
Brown University, USA

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
SIPtoolbox-devel mailing list
SIPtoolbox-devel@...
https://lists.sourceforge.net/lists/listinfo/siptoolbox-devel