Learn digital image processing with Matlab.

I regularly delete my unaccepted answers.

Professional Interests: Image processing

Answered

Defining functions

Hi, Richard. First, you need to create a new m-file then type this code: function y = f(x) y = 2 * (x^3) + 7 * (x^2) ...

Defining functions

Hi, Richard. First, you need to create a new m-file then type this code: function y = f(x) y = 2 * (x^3) + 7 * (x^2) ...

5 months ago | 4

| accepted

Answered

How do I combine multiple plots in one graph?

To combine multiple plots in one graph, use the “hold on” command, such as: plot(1:10) hold on plot(11:20) hold off ...

How do I combine multiple plots in one graph?

To combine multiple plots in one graph, use the “hold on” command, such as: plot(1:10) hold on plot(11:20) hold off ...

5 months ago | 10

| accepted

Answered

Convert AVI file to series of images

Hi, This is the simpler version : obj = mmreader('rhinos.avi'); vid = read(obj); frames = obj.NumberOfFrames; f...

Convert AVI file to series of images

Hi, This is the simpler version : obj = mmreader('rhinos.avi'); vid = read(obj); frames = obj.NumberOfFrames; f...

7 years ago | 1

| accepted

Answered

Image to binary conversion

for i = 1 : a for j = 1 : b k{i,j} = dec2bin(image(i,j)); end end please use cell-array to s...

Image to binary conversion

for i = 1 : a for j = 1 : b k{i,j} = dec2bin(image(i,j)); end end please use cell-array to s...

7 years ago | 0

| accepted

Answered

matlab code

The error message sounds you accessed X(213,1) while the size of X is 212x320 X is a gray image generated from command : X = ...

matlab code

The error message sounds you accessed X(213,1) while the size of X is 212x320 X is a gray image generated from command : X = ...

7 years ago | 0

| accepted

Answered

resize subplot

Hi, Pan You can use 4 axes and replace command subplot with imagesc(vid2(:,:,:,frame3),'parent',axeshandle); This is...

resize subplot

Hi, Pan You can use 4 axes and replace command subplot with imagesc(vid2(:,:,:,frame3),'parent',axeshandle); This is...

7 years ago | 0

| accepted

Answered

make history

Hi, Rahma I have seen your picture. I think I cannot do it with your way. Imagine if we have A-m-5 in 1st component an...

make history

Hi, Rahma I have seen your picture. I think I cannot do it with your way. Imagine if we have A-m-5 in 1st component an...

7 years ago | 1

| accepted

Answered

combine binary image

Hi, I think, first you should check whether the data is empty or not using for-loop. hnd = {handles.cJalan,handles.cSung...

combine binary image

Hi, I think, first you should check whether the data is empty or not using for-loop. hnd = {handles.cJalan,handles.cSung...

7 years ago | 1

| accepted

Answered

how to use fopen in this situation?

Hi, ts is cell array. please try ts = cell2mat(ts); after line ts = inputdlg(prompt,dlg_title,num_lines,def...

how to use fopen in this situation?

Hi, ts is cell array. please try ts = cell2mat(ts); after line ts = inputdlg(prompt,dlg_title,num_lines,def...

7 years ago | 1

| accepted

Answered

how to saving image of quadtree from axes

Hi, Elsya please try to add this line ImQuadtree = 255*ImQuadtree; after line : ImQuadtree = getimage(handles.qu...

how to saving image of quadtree from axes

Hi, Elsya please try to add this line ImQuadtree = 255*ImQuadtree; after line : ImQuadtree = getimage(handles.qu...

7 years ago | 0

| accepted

Answered

how to use button that controls video?

function vidplayer() obj = mmreader('rhinos.avi'); v = read(obj); hstat = uicontrol('unit','pixel','style','checkbox'...

how to use button that controls video?

function vidplayer() obj = mmreader('rhinos.avi'); v = read(obj); hstat = uicontrol('unit','pixel','style','checkbox'...

7 years ago | 0

| accepted

Answered

linking GUIs in MATLAB

Hi, Let say I have 2 GUIs. untitled1 untitled2 In first GUI I have pushbutton to call the second GUI. Just...

linking GUIs in MATLAB

Hi, Let say I have 2 GUIs. untitled1 untitled2 In first GUI I have pushbutton to call the second GUI. Just...

7 years ago | 1

| accepted

Answered

External functions (with a GUI)

Hi, Maybe this will helps. I have GUI as shown in picture below : <<http://i1196.photobucket.com/albums/aa410/nasa078/M...

External functions (with a GUI)

Hi, Maybe this will helps. I have GUI as shown in picture below : <<http://i1196.photobucket.com/albums/aa410/nasa078/M...

7 years ago | 1

| accepted

Answered

use subplot play video

Hi, maybe obj = mmreader('xylophone.mpg'); vid = read(obj); for frame = 1 : size(vid,4) bw = im2bw(vid(:,:,:,f...

use subplot play video

Hi, maybe obj = mmreader('xylophone.mpg'); vid = read(obj); for frame = 1 : size(vid,4) bw = im2bw(vid(:,:,:,f...

7 years ago | 0

| accepted

Answered

centroid of an image

Hi, did you mean 'find centroid of objects in an image'?? use *regionprops* with property : centroid Eg : stat = regio...

centroid of an image

Hi, did you mean 'find centroid of objects in an image'?? use *regionprops* with property : centroid Eg : stat = regio...

7 years ago | 5

| accepted

Answered

create target for neural network

Hi, Remo Feature vector that extracted from an image ideally m x 1 matrix. You said that it's 42 x 42. Is it means 42 feat...

create target for neural network

Hi, Remo Feature vector that extracted from an image ideally m x 1 matrix. You said that it's 42 x 42. Is it means 42 feat...

7 years ago | 1

| accepted

Answered

How to Capture objects in big image and divided them to small images?

This code works just for this image only Irgb = imread('b653er.jpg'); Igray = rgb2gray(Irgb); Ibw = im2bw(Igray,grayt...

How to Capture objects in big image and divided them to small images?

This code works just for this image only Irgb = imread('b653er.jpg'); Igray = rgb2gray(Irgb); Ibw = im2bw(Igray,grayt...

7 years ago | 0

| accepted

Answered

How to crop out the barcode??

D = C > 20; Ilabel = bwlabel(D); stat = regionprops(Ilabel,'boundingbox'); for x = 1 : length(stat) Icrop{x} =...

How to crop out the barcode??

D = C > 20; Ilabel = bwlabel(D); stat = regionprops(Ilabel,'boundingbox'); for x = 1 : length(stat) Icrop{x} =...

7 years ago | 0

| accepted

Answered

need help on a simple question.

Hi, please replace * fprintf ('The char is %4s\n','s',char)* with * fprintf ('The char is %s\n',char);*

need help on a simple question.

Hi, please replace * fprintf ('The char is %4s\n','s',char)* with * fprintf ('The char is %s\n',char);*

7 years ago | 0

| accepted

Solved

Increment a number, given its digits

Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

7 years ago

Solved

Too mean-spirited

Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

7 years ago

Solved

Which values occur exactly three times?

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

7 years ago

Solved

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

7 years ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

7 years ago

Solved

Find common elements in matrix rows

Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

7 years ago

Solved

Reverse Run-Length Encoder

Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

7 years ago

Solved

Counting Sequence

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

7 years ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

7 years ago

Solved

Duplicates

Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

7 years ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

7 years ago