[SIP-devel] Fwd: SIP Window - Mogrify rotate
Advanced image processing toolbox for Scilab on Unix/Linux/Mac OS
Status: Beta
Brought to you by:
ricardofabbri
From: Ricardo F. <rf...@le...> - 2006-07-19 17:24:07
|
---------- Forwarded message ---------- From: Emmanuel de Bilbao <emm...@un...> Date: Jul 19, 2006 2:45 AM Subject: Re: SIP Window - Mogrify rotate To: Ricardo Fabbri <rf...@le...> 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 =E9crit : Use the "string" function (help string) hope it helps, On 7/5/06, Emmanuel de Bilbao <emm...@un...> 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=3Dmogrify(bmat,['-rotate','10']); like the demo BUT it doesn't run with : AngRotV=3D-180*atan((abvl+abvr)/2)/%pi; bmatr=3Dmogrify(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]=3DRBENFilter(ImIn,rh,rl) // Input Image ImIn // Output Image : Im // Rank filter : 9> rh > rl >1 // // Filter matrix 3*3 function [f]=3Dfilt(matric) f=3Dzeros(1,9);mtemp=3Dmatric; for rf=3D1:9 g=3Dmin(mtemp); [I,J]=3Dfind(mtemp<=3Dg); f(rf)=3Dmtemp(I(1),J(1)); mtemp(I(1),J(1))=3D300; end endfunction function [v]=3DENF9(matric,rh,rl) f=3Dfilt(matric); if abs(f(rh)-matric(2,2))>abs(f(rl)-matric(2,2)) then v=3Df(rl); end; if abs(f(rh)-matric(2,2))<=3Dabs(f(rl)-matric(2,2)) then v=3Df(rh); end; endfunction function [Im]=3DRBENFilter(ImIn,rh,rl) [Nl,Nc]=3Dsize(ImIn); Im=3DImIn; for i=3D2:Nl-1 for j=3D2:Nc-1 mask=3DImIn(i-1:i+1,j-1:j+1); Im(i,j)=3DENF9(mask,rh,rl); end end endfunction --=20 Ricardo Fabbri PhD Student in Computer Engineering / Computer Vision LEMS - Laboratory for Engineering Man-Machine Systems Brown University, USA |