Blog Arşivleri

Edge Detection on Matlab

Hi everyone,

At my this project i am going to make edge detection. I will use matlab’s built in functions.

lena

This is my original photo. I will read it, convert to the gray, finally from the gray photo i will detect the edges.  As you can see from the code below, i used sobel edge detection.

lena=imread('lena.jpg');
lena_gray=rgb2gray(lena);
lena_gray_double=double(lena_gray);
lena_gray_double=lena_gray_double/max(max(lena_gray_double));
figure;
edge(lena_gray_double,'sobel')
title('Built-in Edge Detected Image With Sobel');
%https://ozturkgokhan.com/

out

Best wishes;
Gökhan ÖZTÜRK

Plotting Equation at Z-Plane

Hi, today i will try to plot poles and zeros of an parametric equation. 
A parametric equation type is given below b(n) and a(n) are the coefficients 
of the equation 

Ekran AlıntısıAssume we know the  coefficients. Let's try to plot at z- plane.

b1=[1 -0.4944 0.64];
b2=[1 0.4944 0.64];

root_a1=roots(a1); 
root_b1=roots(b1);

figure;zplane(root_b1,root_a1);
title('Pole-Zero Diagram of a1-b1 System');
%http://ozturkgokhan.com

untitled
As u see we managed the process.
Best wishes;
Gökhan ÖZTÜRK

Making Downcounter at App Inventor 2

Hi everybody,
Now i will try to make downcounter at app inventor2.
At my first post  about app inventor, i made button control.
In this application we will use it and we will create a downcounter.

We will use clock, button and label component.

design

When we push the start button, a counter will start to count from ten to zero..

block

I defined a variable named “value1” that has the value of ten. At the beginning -when screeen initialized- clock is disabled. When we push the button, value of the “value1” will decrease one-by-one until it reaches to zero. When the counter’s value is zero, button’s text will change to “finished”. Then it will wait for another input as pushing.

Best Wishes,

Gökhan Öztürk

Usage of Slider Component at App Inventor 2

Hi, my second post will be about usage of slide component at app inventor 2.

Slider is a component that its value change by the position. We can define the max. and min. value.

I took a label and slider from user interface and put them in to a VerticalArrangement that taken from layout.

design

When we change the slide its value will change and then label will change. If the thumb position is lower than 25 label will be “b” and if the thumb position is higher than 25 label will be “a”

blocks

Program output at screen.

gokhan

best wishes,

gökhan öztürk