[Solved] how to extract data from image by user [closed]

Try this: A=imread(‘your image’); imshow(A); impixelinfo; [c, r, vals] = impixel; c and r are arrays of all the columns and rows of the part of the image that user clicked on and vals are the RGB values of each point. 2 solved how to extract data from image by user [closed]

[Solved] Find and replace using Matlab [closed]

If mat1 and mat2 are the first and second matrices you described, this should do the join you need with indexing functions. [~, I] = ismember(mat2(:, 2), mat1(:, 1)); Output = [mat2(:, 1) mat1(I, 2:end)] 1 solved Find and replace using Matlab [closed]

[Solved] Applying the formula to determine the barcode – Matlab

I tend to agree with nikie that you should be working from a book if you are at this basic level, but here is an answer anyway. I = imread(‘your_image’); # convert I to grayscale double as appropriate using rgb2gray(), double(), etc. # calculate the gradients and the formula you provided [dIx, dIy] = gradient(I); … Read more

[Solved] Given a row vector, how do I create an indicator matrix placing each value in its respective column location?

Another approach is through bsxfun and unique. Assuming that A is a row vector, you would do the following: un = unique(A.’, ‘stable’); out = bsxfun(@times, bsxfun(@eq, A, un), un); out contains your desired result. This code deserves some explanation. The first line of code determines all unique entries in A stored in un, but … Read more

[Solved] how homogeneity is calculated? [closed]

You can draw homogeneity criteria from the histogram of gray-levels or the histogram of gradient intensities. A low dispersion (small variance) reveals a quasi-constant lightness, but is sensitive to smooth variations. A low gradient average reveals a lack of detail, but is sensitive to texture/noise. 4 solved how homogeneity is calculated? [closed]

[Solved] How to apply sliding window for subtracting two different images in matlab? [closed]

The upper bounds of your for-loops are the cause for your troubles. You specify: imh=size(ab,2); imw=size(ab,1); However, your for-loops have these conditions: j=1:imh+wh-1 and i=1:imw+ww-1 So you move past both the ‘height’ and the ‘width’ dimension. Try this instead: for j=1:imh-wh for i=1:imw-ww w1=ab(j:j+wh,i:i+wh,:); w2=salt(j:j+wh,i:i+wh,:); w3=w1-w2; end k=k+1; end 1 solved How to apply sliding … Read more

[Solved] how to use svm classifier in feature extraction

This question is about how to use these matlab functions: http://www.mathworks.com.au/help/stats/svmtrain.html http://www.mathworks.com.au/help/stats/svmclassify.html http://www.mathworks.com.au/help/bioinfo/ref/classperf.html If you are trying to classify entire videos you will have one label per video, i.e. assign 1 or 0 to “single block of 40 by 5 like 20 rows”, In which case your Training data matrix should be 20×200 (20 videos … Read more

[Solved] Plot a three variables function over the specified domain in MATLAB [closed]

its still a little unclear as to what you’re trying to accomplish. Is this what you’re trying to do?: x1=0.5:.01:1.6; x2=280:0.453:330; x3=-2.06:.0373:2.06; V = x1.^2+x2.^2+x3.^2+3.*x1.*x3-x2.*x3-4.*x2.*x1; subplot(3,1,1) plot(V,x1) subplot(3,1,2) plot(V,x2) subplot(3,1,3) plot(V,x3) 3 solved Plot a three variables function over the specified domain in MATLAB [closed]