## siptoolbox-devel — Development and advanced discussion

You can subscribe to this list here.

2002 2003 2004 2005 2006 2007 2009 2010 2011 2012 2013 2016 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov (5) Dec (15) Jan (1) Feb (11) Mar (18) Apr (1) May (10) Jun (5) Jul (7) Aug (5) Sep (12) Oct (2) Nov Dec (13) Jan (13) Feb (46) Mar (20) Apr (10) May (13) Jun (8) Jul (5) Aug (1) Sep Oct Nov Dec Jan (1) Feb Mar Apr May Jun (1) Jul (47) Aug (14) Sep (7) Oct (1) Nov Dec Jan (11) Feb (17) Mar (5) Apr (9) May (1) Jun Jul (5) Aug (4) Sep (1) Oct Nov (1) Dec (1) Jan (5) Feb (2) Mar Apr (1) May Jun (2) Jul (18) Aug Sep Oct Nov Dec Jan Feb (3) Mar (8) Apr (5) May Jun Jul Aug Sep Oct (1) Nov Dec Jan Feb Mar Apr May (1) Jun Jul Aug Sep (2) Oct (6) Nov Dec Jan Feb Mar Apr May Jun Jul Aug (1) Sep (2) Oct (4) Nov Dec Jan Feb (2) Mar (4) Apr May Jun (4) Jul (1) Aug (2) Sep Oct (1) Nov (3) Dec Jan Feb Mar (1) Apr (2) May Jun Jul Aug Sep (3) Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov (1) Dec
S M T W T F S

1
(1)
2
(2)
3

4

5

6

7
(1)
8
(1)
9

10

11

12

13

14

15

16

17

18

19

20

21

22
(1)
23

24

25

26

27

28

29

30
(1)
31

Showing 7 results of 7

 Re: [SIP-devel] images fft From: Ricardo Fabbri - 2003-07-30 21:56:57 ```> I wanted too to: > 1) calculate the spectrum of an image > 2) modify the spectrum > 3) apply a reverse fourier transform to see modifications on the original > picture (strioscopy, foucaultage). > But I don't know how to perform a reverse fourier transform with scilab. Hello, Jocelyn, Sorry for the long delay. It is a bit confusing to use the DFT, but it is not hard once you get used to it. (I apologize if you already know some of the stuff I'm going to say). It seems that all you want is to calculate the image power spectrum centered on the array. It is simple: // im is a grayscale image IM = fft(im,-1); // powerspectrum = |IM|^2 // (you could use only abs, too). spectrum = abs(IM).*conj(IM) // to center the power spectrum spectrum = fftshift(spectrum); imshow(spectrum,[]); To visualize low frequencies, I don't think you need to threshold like you did: imshow(log(spectrum + 1),[]) That simple trick greatly enhances the pow.spectrum (see Gonzalez & Woods Digital Image Processing book). // reverse tranform im2 = real( fft(IM,1) ); To modify the spectrum and take the inverse fft, the code of SIP's gsm2d helps you understand how it is done. Roughly speaking, you have to remind that Discrete Fourier Transforms understand the spectrum as a finite window of a period over the whole continuous infinite spectrum with period T. By convention (I guess) DFTs choose NOT the window _arround_ the origin, but the window _starting_ at the origin. So what you have to do is: 1 - Modify the spectrum. Before this, centralize it if you want (using fftshift), or calculate shifted coordinates, like I did in gsm2d. 2 - Pass it to the inverse FFT. HOWEVER, if you used fftshift, you must first use it again to re-wrapp your image to the conventional form that FFT understands it. BTW, I saw in the help file that you use the following construct to show an image and normalize it: imshow(normal(spectrum1,255,0)); It is equivalent and easier like this: imshow(spectrum1,[]); Thanks again for your active engagement in SIP development. Ricardo. -- Ricardo Fabbri, Cybernetic Vision Research Group, USP, Brazil. http://www.rfabbri.kit.net "Quality and Quantity are both good, but nowadays we miss Quality" ```
 [SIP-devel] images fft From: DRUEL Jocelyn - 2003-07-22 15:23:52 Attachments: imfft.man imfft.sci ```Hi, A function to obtain the frequency spectrum of an image. My problem with scilab's fft function was that the result did not correspond to what I saw each time I performed a Fraunhoffer diffraction. So I moved low frequencies from the edges to the center and added a few parameters to help visualisation of details in the spectrum. I wrote this function to 1) illustrate (and simulate) diffraction by several openings. 2) for a double exposition speckle experiment: an object is lightened by a laser beam: a 1st picture of the speckle is taken with a CCD camera. The object is then moved of several microns. A 2nd picture is taken. Adding the 2 pictures and then launching a fft transfrom will show fringes. The space between fringes is related to the object displacement. I'm really not a fft specialist so don't hesitate to criticize this work. I wanted too to: 1) calculate the spectrum of an image 2) modify the spectrum 3) apply a reverse fourier transform to see modifications on the original picture (strioscopy, foucaultage). But I don't know how to perform a reverse fourier transform with scilab. Best regards Jocelyn -- Powered by Linux```
 Re: [SIP-devel] sip slow in windows From: Ricardo Fabbri - 2003-07-08 22:33:01 ```On Wed, 2 Jul 2003, DRUEL Jocelyn wrote: > Hi, > Testing sip in windows, I find it very much slower than under linux to > display images. > It refreashes the display very often and the refresh is too slow for me. > > > Does anybody have a solution to improve speed on windows > (scilab2-7 seems a bit faster than scilab-2.6)? > My OS is win2k. > Hi, Jocelyn, Scilab is awfully slow for displaying images. I'm thinking about rewriting some of scilab's graphical functions to speed this process up, but it will take me a lot of time. In the meanwhile, You can try this in scilab 2.7: xset("pixmap",1); // pixmap mode imshow(some_image) xset("wshow") // shows the pixbuffer in the screen at once xset("pixmap",0); // returns to normal mode My friend which has a windows box is using it, so I won't be able to test that solution until thursday. Until then, please tell me if it works for you. The drawback of this solution is that it may be hard to use subplot, I think. You should also post your question to the scilab newsgroup: comp.soft-sys.math.scilab hope it helps, Ricardo. -- Ricardo Fabbri, Cybernetic Vision Research Group, USP, Brazil. http://cyvision.if.sc.usp.br/~rfabbri ```
 Re: [SIP-devel] auto-loading the sip toolbox in windows From: Ricardo Fabbri - 2003-07-07 23:15:34 ```On Wed, 2 Jul 2003, DRUEL Jocelyn wrote: > > I think, you could indicate that adding this line at the end of c:\program > files\scilab-2.6\scilab.star can be good (if several users use the machine, > there's no need to write several .scilab files for each of them): > exec 'c:\program files\sip-0.1.0-win\loader.sce' > Agreed. Done for next version. Ricardo. -- Ricardo Fabbri, Cybernetic Vision Research Group, USP, Brazil. http://cyvision.if.sc.usp.br/~rfabbri ```
 [SIP-devel] sip slow in windows From: DRUEL Jocelyn - 2003-07-02 18:49:53 ```Hi, Testing sip in windows, I find it very much slower than under linux to display images. It refreashes the display very often and the refresh is too slow for me. Does anybody have a solution to improve speed on windows (scilab2-7 seems a bit faster than scilab-2.6)? My OS is win2k. Thanks Jocelyn -- Powered by Linux ```
 [SIP-devel] auto-loading the sip toolbox in windows From: DRUEL Jocelyn - 2003-07-02 18:48:49 ```Hi, To have the automatic loading of the sip toolbox in windows, the install.txt file (in sip-0.1.1-win5) suggests that you modify the autoexec.bat and use .scilab files. I think, you could indicate that adding this line at the end of c:\program files\scilab-2.6\scilab.star can be good (if several users use the machine, there's no need to write several .scilab files for each of them): exec 'c:\program files\sip-0.1.0-win\loader.sce' For me, it's a more convenient solution. Best regards Jocelyn -- Powered by Linux ```
 Re: [SIP-devel] new interf_demo + pbs From: DRUEL Jocelyn - 2003-07-01 09:40:26 Attachments: gui_0.1.17_corrected1.sce ```Hi Riccardo, I hope your exams were all right. I send you a new version of the gui: Le Mardi 1 Juillet 2003 00:47, vous avez écrit : > On Sat, 21 Jun 2003, DRUEL Jocelyn wrote: > > 2) 2 functions to take pictures from a video camera using xawtv. We use a > > cheap miroPCTV for this (about 50\$). This works on linux only of course. > > Cool. I suggest that you check if the xawtv command is available > before calling it. But this is not very important. > Good idea. I did a message if we're under windows but I don't know how to test the existence of xawtv from within scilab. There was a syntax error in the function snap1: 2 , instead of 1 in the name=xgetfile... This is now corrected. > > 3) modifications to use gray_imread: > > I replaced many gray_imread by gray_imread/2555 because I had problems > > with displaying or tracing profiles. I don't exactly know why. > > This is due to the fact that you read your .jpg images, which are > pseudo-color (indexed). What you probably did before imread was to use > the index of the image, which points to 256 different colors in the > colormap. The colors in the colormap goes from 0 to 65535, so you must > divide by __257__ to get the 0-255 range (65535 / 257 == 255). > ok, I changed my division factor from 255 to 257 > > The gray_imread function is much much slower than imread when I read > > grayscale pictures. A test on my box gave: 2.4 and 0.26 (estimated by > > timer()). That's a pb for me (specially as I read several images to make > > some calculations). > > gray_imread (because of im2gray) is really very slow, I haven't > noticed that before. I optimized im2gray to eliminate a for loop (see > attachment). gray_imread is much faster now. In scilab any loop over > an image is prohibitive :-((. It is ok just for "thumbnail-sized" > images, when we need to prototype an algorithm. > > I could implement im2gray in C, but the trick I done in gray_imread > saved me some development time. But if it is still slow, please tell me. > The speed is now all right for me. I have a pb with the mogrify function: I tested b=mogrify(image, '-draw circle 100,100 150,150') the answer is: non conforming drawing primitive definition I saw that "draw" is the only options which requires a string. Is it the problem ? Well, if you have a solution, maybe you could add it in the examples of the help page. Best regards Jocelyn -- Powered by Linux```

Showing 7 results of 7