Tuesday, June 19, 2012

2nd Activity: Scilab Basics

In this activity, we were introduced to Scilab and its Image and Video Processing. We were tasked to familiarize ourselves with this language since we used Python in our previous subjects. 

I realized that there are many things that could be done in Scilab. Things that could be done simpler compared with other languages. 

As an exercise, we were given a code for creating a  circular aperture. The code and the image produced are shown below.

nx = 100;
ny = 100;

x = linspace(-1,1,nx);
y = linspace(-1,1,ny);
[X,Y] = ndgrid(x,y);
r = sqrt(X.^2 + Y.^2);
A = zeros(nx,ny);

A(find(r<0.7)) = 1;
imshow(A);



For further problems, we were tasked to do a centered square aperture,  sinusoid along the x-direction, a grating along the x-direction,  annulus, and a circular aperture with graded transparency.

Figures 2, 3, 4, 5, and 6 shows the produced output.

Figure 2. A centered square aperture




Figure 3. A sinusoid which is along the x-direction

Figure 4. A grating which is along the x-direction


Figure 5. An annulus


Figure 6. A gaussian transparency




Self evaluation

I grade myself an 8. Technical correctness 4 and quality of presentation 4. 
I had a VERY hard time installing the Scilab and SIVP. It only took me less than an hour to finish this activity. If given an ample time, I could have done a better job in this activity.





1 comment: