MATLAB Programming

372

Solutions

443

Contributors

MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.

Share tech news, updates, or what's on your mind.

Sign up to Post

You can refer to section 4.3.1 in this article if you want.

Problem: Given a reference point and a direction, I need to find the core of a line scratch.


  1. To do that, according to the article, I need to select a prominent point on the line-scratch and that point would be used as the reference point pR.
  2. Then start a search from that reference point, proceeding on both sides of the line along the direction dS.
  3. If pI is our current point at column k (shown in yellow here),
    • take 5 points adjacent to pI at column k+1 (shown in blue here).
    • find the point with the largest similarity value.
    • add the point to the core.

pixel-candidatesWe will use a specific function as the similarity measure. That function uses correlation, among other things, as a measure.

equation
  1. pI is the i-th pixel at the column-k.
  2. w1 and w2 are constants with values 0.75 and 0.25 respectively.
  3. cG is a global correlation factor measured between a matrix centered at pR and another matrix pKi which has a center at pI.
  4. g is a Gaussian function computed at pI.
  5. cL is a local correlation factor measured between a matrix centered at pK_1s and another matrix pKi which has a center at pI.
  6. pK_1s is the last included point at the core.

Implementation
Please, see the source code later in this question.

What is the problem I am facing right now?
 
  1.  I am not sure whether the matrices (i.e. pKi, matrix around pR, pI and so on) I am using are taken correctly.
  2.  I am not sure about the usage of dS.
0
Want Experts Exchange at your fingertips?
LVL 9
Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

I am very new to image processing and Matlab. I am working with RGB image and used SLIC algorithm to generate superpixel for an image. By using regionprops to calculate the superpixel properties.

[Rcounts binlocations]=imhist(ImageRED);
[Gcounts binlocations]=imhist(ImageGREEN);
[Bcounts binlocations]=imhist(ImageBLUE);
Q1: I have 48 superpixels with Counts(R,G,B channels) it is giving me 256*1 double(most of them are zero). Can anybody explain how to refine them to get each superpixel histogram?

Q2: How can I compare and calculate the distance between two specific superpixel histograms?

Any help is greatly appreciated. Thanks in advance
0
how can I add a constraint for vibration damper in a SUV vehicle model meant to demonstrate a rollover
0
Hi,

I have a covariance matrix and I am using Matlab's chol function for cholesky decomposition. However, since my matrix is not a positive definite matrix. I am getting an error. How can I figure out which correlations/covariances in the matrix are leading to the problem.

Attached file contains the matrix.

Thanks
EE1.xlsx
0
How to write program for  encryption and decryption input text using RC4 algorithm in Matlab?
0
how i can apply fuzzy logic for this problem? Or is there any other technique i can use for my problem?

Input : parameter values Output : (1) OLTP , (2) DSS , (3) % of OLTP and % of DSS

I have to classify between 3 classes as OLTP, DSS and mix type. if my input matches with OLTP or DSS type it return crisp class. if it matches with mix type it returns the percentage of OLTP and DSS
0
How can i apply fuzzy logic for this problem? Or is there any other technique i can use for my problem?

Input : parameter values Output : (1) OLTP , (2) DSS , (3) % of OLTP and % of DSS

I have to classify between 3 classes as OLTP, DSS and mix type. if my input matches with OLTP or DSS type it return crisp class. if it matches with mix type it returns the percentage of OLTP and DSS.
0
Two vehicles update their position using latitude and longitude using .csv file. Plot the graph for two vehicles in a single graph to detect the collision.
0
I have attached the file of Matlab output. How to detect the intersection points red dots. Whenever it detect the red dot at intersection alert message should be displayed.
curveintersectionsexample.png
0
Hi, I am beginner in Matlab, need help or advise on how to do this? If i have 2 image in gallery (one basketball image and one badminton image)-Basketball.JPG/Badminton.JPG I created GUI. Then i am able to upload the one of the image. But how do i compare this upload image with the 2images in gallery. So that if uploaded image matches Basketball, it will display Basketball. and if uploaded image matches Badminton,it will display Badminton.
0
Enroll in July's Course of the Month
LVL 9
Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Hi

I have .csv file with two cols . I need to take 13 values from 1st col then 13 values from 2nd cols and make then as one row with 26 col

until the end of file .
zju_25_5.csv
0
Hi

in the following code I'm searching for a match of indexes between 2 files , if I found a match take -6,6 elements from the 1st file .

I need to save the found data as (1,13) . (data ) array shows the elements as I print it when I run the code  but after finishing executing only the last element is saved .

earFilename = 'EAR_v1.txt';
stateFilename = 'output_close_tags_video_1.txt';

% read EAR values
 earfile = fopen(earFilename,'r');
 formatSpec = '%d %f %f';
 sizeA = [3 Inf];

earVector = fscanf(earfile, formatSpec, sizeA);
earVector = earVector';

% read state file
 statefile = fopen(stateFilename,'r');
 formatSpec = '%d %*s';
 sizeA = [1 Inf];

   stateVector = fscanf(statefile, formatSpec,sizeA);
   stateVector = stateVector';

% create a dataset containing framenumber, EAR, state
dataset = [earVector, -1*ones(size(earVector,1),1)];

% for each positive state, +-6 frame are marked as positive
data=[];
for i = stateVector'
  rowNumber = find(dataset==i);
  for j = -6:6
      data=(rowNumber+j);
      disp(data)

Open in new window

0
I am using MATLAB 2009,I have a micro-structure image and I transformed into greyscale image and then to BW.  Now I want to know the number of pixels along the scale bar (scale bar width is one pixel size), in order to calculate grain size. Please help me to find out How many pixels in the line of specified length with constant width of pixel size. using MATLAB. or suggest me other way to find the grain size from the microstructure image.
Thank you in Advance.
0
I want to find out principal curvatures for a image in MATLAB.  How to find it out and how will be its code in MATLAB
0

MATLAB Programming

372

Solutions

443

Contributors

MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.

Top Experts In
MATLAB Programming
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!