Wednesday, May 20, 2015

VB Problem!


Monday, March 30, 2015

Solution of a ROI filter types Matlab problem 4 4grade Mechatronics students!

Solved Problem: Write Matlab script to define a ROI on an input gray scale image, then enable the selection of filter types available with user control to keep selecting or not!
(The Output layout is like the figure below:)
%********************************************
%* ROI Filter Types for Gray images!  *
%* Program name: ImageProEx33       *
%********************************************

close all
a = 'Y';
disp ('This is an example of Gray image ROI (Type) filter!');
disp ('==============================================');
clc
A = input ('Enter Gray level image file name: ','s');
I = imread(A);
I =rgb2gray(I);
% Hint: use the following Polygon Vertex coordinates for Coins ex. only!
% Columns: 222 272 300 270 221 194
% Rows     :  21   21  75  121 121   75

N = input ('Enter No. of Polygon vertices: ');
   for i=1:N
     c(i) = input('Column: ');
     r(i) = input('Row : ');
   end
  
while (a=='Y') || (a=='y')
    close all
    % Using different types of available ROI filters
     t = input ('Enter Filter No.(1-9): ');
    BW = roipoly(I,c,r);
  switch t
    case 1
        H = fspecial('average');
        f = 'average';
    case 2
        H = fspecial('disk');
        f = 'disk';
    case 3
        H = fspecial('gaussian');
        f = 'gaussian';
    case 4
        H = fspecial('laplacian');
        f = 'laplacian';
    case 5
        H = fspecial('log');
        f = 'log';
    case 6
        H = fspecial('motion');
        f = 'motion';
    case 7
        H = fspecial('prewitt');
        f = 'prewitt';
    case 8
        H = fspecial('sobel');
        f = 'sobel';
    case 9
        H = fspecial('unsharp');
        f = 'unsharp';
    otherwise
        disp('Unknown Filter Type!');
  end

J = roifilt2(H,I,BW);
subplot (1,2,1); imshow(I),title ('Original image');
subplot (1,2,2); imshow(J),title ({f,' Filtered image!'});
a = input ('Another try (Y/N)? ','s');
close all
end

Sunday, March 22, 2015

بعض من صور التخرج لطلبة الصف الرابع قسم الميكاترونك

Check some of Graduation day photos taken by my digital camera published on my Lectures website (Photo Gallery web page!).

Sunday, March 15, 2015

توزيع المشاريع المصغرة الخاصة بدرجة نشاط الطالب و اعمال السنة.... (10%) على طلبة الصف الرابع قسم الميكاترونك في مادة Digital Image Processing

آلية العمل: 
1- تقوم كل مجموعة طلبة بتسليم CD حول الموضوع النظري + برامج الماتلاب الخاصة به.
2- يرجى العلم بان آخر يوم لاستلام الاقراص هو يوم الاثنين  2015/04/26 و لن يتم استلام أي قرص بعد هذا الموعد!
مع التمنيات بالموفقية

اسماء مجاميع الطلبة موزعين حسب رقم المشروع                                                     ========================================

  •  فائزة محمود غازي ...........................1
  • آلاء عزاوي         ...........................10
  • احمد رافع / مرثد وميض مجيد .................3
  • سارة محمد رشيد .............................12
  • ورود نذير نوري / نور عبدالجبار ................6
  • ابراهيم محمد سلمان ...........................2
  • زينة سعدون / مازن سعد ......................5
  • فرات كريم محسن ............................11
  • أمجد رائد / أيمن كريم / محمد عبد الجبار.........7
  •  احمد جواد / علي حاتم .......................8
  • طيبة داود / استبرق عبدالحسن ...................9
  •  نور عبدالجبار / ورود نذير .................... 10
  • زينب علوان جياد ............................  14
  • اسراء سبهان / اسراء علي حسين................ 13
  • محمد جاسم / علاوي اسماعيل ..................4
 تم اختيار جميع عناوين المشاريع المصغرة
في حالة عدم ظهور أي ٍ من الاسماء فذلك دلالة على عدم الاختيار 

  
             Mini Project Title اسم المشروع المصغر
 =====================================================
1-Gaussian noise and Gaussian filter implementation using Matlab

2-Median filter to remove Salt & Pepper noise with Matlab script

3- Discrete Fourier Transform Equation (Matlab).

4-Edge and Corner Detection with Matlab implementation.

5-Image Compressing using Discrete Cosine Transform in Matlab

6
-Image compression  (JPEG algorithm) using MATLAB

7-Image segmentation using nearest neighbor classifier in Matlab

8-Implementation of Median filter in Color Image using Matlab

9-Implementation of Watermarking using Discrete Cosine Transform in Matlab

10-Matlab Object Detection Tracking

11-The Huffman Coding (Image Compression-using Matlab)

12- Signal Analysis using Matlab


13- Image segmentation using nearest neighbor classifier in Matlab

14- Simple Image Processing examples using GUI Matlab

Tuesday, March 10, 2015

Solved Example in Matlab (4-2nd Grade Class of Mechatronics Dept).

Example: Write Matlab Script that enables user to enter x start, end, and incrementing values necessary to plot the following two functions: Y = exp(x^2) , and Y = sin(x) using two separate figures with title for each graph and labels for x axis (values), and (Amplitude) for y axis? This procedure may continue according to user's control!
Solution:

%******************************************
%* Plotting 2 Function in 2 Figures!  *
%* Program Name: plot2figs             *
%******************************************

ch = 'y';
while (ch == 'y') || (ch == 'Y')
   
     clc, close all;
     xs = input ('Enter x   start value: ');
     xe = input ('Enter x   end   value: ');
     xc = input ('Enter increment value: ');
     X=(xs:xc:xe);
     Y=exp(X.^2);
     plot(X,Y)
     ylabel('Exp (X^2)')
     title('Function y = exp(x^2)')
     figure
     Y=sin(X);
     plot(X,Y,'r')
     ylabel('sin (X) in radian')
     title('Function y = sin (X)')
     disp('===========================');
     ch = input ('Try again (Y/N)? : ','s');
end

Monday, November 17, 2014

Full Documentation for ROBO MIND Project!

https://www.dropbox.com/s/m67rxnsfbpfj5ad/RoboMind-Documents.pdf?dl=0
Click to Download Full Robo Mind Documentation for My. 4th. grade Mechatronics Project Group students !





https://www.dropbox.com/s/lzpvsl5inllni5v/Lego-MindStormNXT.pdf?dl=0Also you can download an introduction article about LEGO Mindstorm robots !

Thursday, May 22, 2014

Solving a simple geometric problem with matlab!



Example about simple geometric problem:
Write Matlab code to compute the Areas of 4 Circles and 4 acute (isosceles) Triangles shown in the figure below, knowing that the first circle center point in x-axis = 100, radius and triangle base = 5, Triangle height (h) = 3.5  and both are increasing for in 1.25 (of the previous radius and height), with center point displacement = radius?
 Solution:
We can solve the problem for any n cases, here n = 4, so the Matlab script could be something like this:
%===========================================
%= Computing Areas of Circles and Triangles  That share              =
%= the radius as the Acute (isosceles) triangle's side that both =
%= are  increasing at a fixed ratio for n cases!                                     =
%===========================================
clc
x=100;
r=5;
h=3.5;
n = 4;
% Computing first Circle and Triangle Areas
CircleArea= r^2*pi
TriangleArea=(r * h) / 2
% Computing the rest increasing Areas n-1 = 4 -1 = 3 loops
for i=1:3                                % Or,    for i=1:n-1 (in general)
    r = r*1.25;
    h = h*1.25;
    x = x+r;
    CircleArea = r^2*pi
    TriangleArea = (r * h) / 2
end