Skip to main content

Posts

Showing posts from August, 2022

Stretch the dynamic range of the given 8-bit grayscale image using MATL...

How to change matlab stores image data for C++

  Hello everybody i am writing a Program using C++ with OpenCV library! and I am using a function generated by Matlab Mex which takes an image and returns values! it look something like this   array=findsomething(image);//matlab function the image is a OpenCV variable which called Mat! this Mat stores the pixels in a unsigned char array as BGR. while Matlab function stores the pixels in RGB array. converting the data between the OpenCV variable and the Matlab Function variable means copying each pixel from the first variable Mat into Unsigned Char *array(this is the Matlab function Variable) which takes a really long time for each i call an image from the camera. is there a way to change how Matlab stores and handles the image data to become BGR ? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help,MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Co

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

Hi,   I stuck at my study now.   I have one example image.   From this image, I would like to separate these five small objects in the picture to be five small images.   How can I do this. I need your help please.   I am looking forward to hear from you. Thank you very much. NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. This code works just for this image only   Irgb = imread('b653er.jpg'); Igray = rgb2gray(Irgb); Ibw = im2bw(Igray,graythresh(Igray)); Ifill = imfill(Ibw,'holes'); %clear the lines Ihor = imopen(Ifill,strel('line',5,0)); Iver = imopen(Ihor,strel('line',5,90)); Ilabel = bwlabel(Iver); stat = regionprops

How can I create a .mat file in which I store the colour images and the corresponding histograms?

  I want to create the .mat file in which I need to store the Colour images and corresponding each colour image I need to store 4 histograms in row form. Can any one help me with code how to store color image and corresponding histogram in row form?     NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.      Make a 2D array of 1024 column by 50 rows     output = zeros(totalNumberOfImages, 1024); % Initialize for imageNumber = 1 : totalNumberOfImages % Compute the 4 histograms... % Now save them output(imageNumber, :) = [count1, count2, count3, count4]; endM do for all images, then save output (or whatever you want to call it) to a mat file save(matF

How to make bode plot of transfer function?

  Hello, i am trying to make a bode plot of the transfer function of a twin-t notch filter, that i am analyzing. I was able to produce the transfer function, and the bode plot by hand, but i am struggling to do it in Matlab, here is what i have so far: r=320; %Resistance c=100*10^-9; %Capactiance p=(1/(r.*c)); %Beta a=0.95; %Signma, adjusts the wiper of a potentiometer f=(5000); %Target Frequency s= (1i*f); h=((s^2 + p^2) ./ (s^2+4*p*s*(1-a)+p^2)); %Transfer function mh=abs(h); %Magitude of h ah=angle(h); %Phase angle of h, in rads. I am trying to plot the body function, and here is one i made for the transfer function H=2/(s+1):   % Example Transfer Function: g(s) = 2/(s+1) % Numerator num = [2]; % Denominator den = [1 1]; % Transfer Function G = tf(num, den) % Plot Frequency Response bode(G), grid   My question is, how would i represent the numerator and the denominator, since they are both powers of of s, which from my understanding the computer understands as s=jw, and thus i

how to solve stem problem?

  Hi, I would like to make a stem diagram where drop lines are horizontal and not vertical. Even better would be if ML is able to plot horizontal vectors from a baseline of y-axis.   Actually what I'm trying to plot is velocity profile in pipe. NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. I suggest you to use   quiver  function:   y = 0:10; u = 25-(y-5).^2; quiver(0*y,y,u,0*u) Of course you can do it with stem function: x = 0:10; y = 25-(x-5).^2; stem(x,y) view(90,90)     SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-solve-stem-problem-.php

How to adding a plot to existing plot

  I have a base plot in which I would like to add a smaller version of a second plot/figure ontop of the base plot at a certain location.   The second plot (or figure) is already saved as a .fig file. How do I import the .fig file and its data and plot it as is but smaller (so it fits inside the base plot without hiding base plot data) onto the base plot? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Hi Lizan,   This could be a two-parter. First, load the figure, get its children, then get the x and y data of its children. Second, create a second set of axes and plot. Here is an example of getting children of current axes and plotting the data on a s