Skip to main content

Posts

Showing posts from January, 2024

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

How to use a for loop to create a table to display special characters.

  I need to get the rest of the numbers and characters in between?   for t = 1 between = (180:1:200); char = char(between); fprintf('%d %c\n',between , char); end output = 180 µ 182 · 184 ¹ 186 » 188 ½ 190 ¿ 192 Á 194 Ã 196 Å 198 Ç 200 ´ 181 ¶ 183 ¸ 185 º 187 ¼ 189 ¾ 191 À 193 Â 195 Ä 197 Æ     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. Are you looking for something like this   between = (180:1:200); chars = char(between); fprintf('%d %c\n', [between; chars]); Result 180 ´ 181 µ 182 ¶ 183 · 184 ¸ 185 ¹ 186 º 187 » 188 ¼ 189 ½ 190 ¾ 191 ¿ SEE COMPLETE ANSWER

how to create a white image?

  I would like to create a NxM white image. But how to put color vectors [256 256 256] into a 2D array?   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. Try this to create a grayscale image:   whiteImage = 255 * ones(N, M, 'uint8'); imshow(whiteImage); To create an RGB image, try this: whiteImage = 255 * ones(480, 640, 3, 'uint8'); imshow(whiteImage);   SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-create-a-white-image-.php

Image pixels value exceeds 0-255 range, after arithmetic operations on image - How to solve it

  I = imread('img.jpg'); I = (double(I).^3)   The problem is, when I do operations like I.^3, pixels go far away from 255 value. I need them to be in range 0 - 255, and be able to multiply image to any value, without exceeding range.   Anyone got idea how could I do it?   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. You could use mat2gray() to map the min to 0 and the max to 1.   I = mat2gray(I); Multiply by 255 if you want in the range 0-255 and cast to uint8 if you want I = uint8(255 * mat2gray(I)); I would recommend using a more descriptive variable name than I. You don't want it to be mistaken for a 1 or an l, and you don't want

Why does 'implay' or 'imshow' display a blank image for my matrix image data?

  I have black and white image data that is stored in a matrix, 'img'. When I execute the following commands, I can see the image in black and white:   imagesc(img); colormap(gray); However, when I try to display the image using 'imshow' or view a sequence of similar images using 'implay', all I see is a white image. Why can't I see the image data?   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. Try checking the range of your image data. 'imshow' and 'implay' will use a default display range for the data based on the data type. For example, if 'img' is an single or double type, then the display rang

How do I obtain the coordinates of the mouse on the screen displayed somewhere in my figure window?

  How do I obtain the coordinates of the mouse on the screen displayed somewhere in my figure window?   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 enhancement has been incorporated in MATLAB 7.5 (R2007b).   As a workaround in previous MATLAB releases, you can use the following MATLAB function to track mouse motion:     function mousetrk %MOUSETRK function to track mouse motion % This function creates two static text controls % which contain the x & y coordinates of the mouse % The driving callback is executed by the % WindowButtonMotionFcn of the figure. figure axes('Visible','off') xbox = uicontrol('Style','

How can I programmatically print a GUI with a button

  I have created a GUI with GUIDE, and I would like to let app users print an image of the app with a button. How can I do this?   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. There are 2 approaches.   First, the easiest way is with the 'print' function. Call 'print' in the button callback, and it will get the current figure (which is the GUI) and print it.   For more fine-grained control over the printed image, use the following approach:     f = getframe(gcf); % Get an image of the app in pixel color values toShow = figure('Visible','off'); % Create a new invisible figure warning('off','images:initSize:a

how to calculate and plot power spectral density of a given signal?

  I have signal and i want to plot it's power spectral density , What should i do? is it right if i first calculate the FFT of a signal and then get the square abs of it's value?   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. If you have the Signal Processing Toolbox, it is easiest to use periodogram().   That handles all the scaling for you.       Fs = 1000; t = 0:1/Fs:1-1/Fs; x = cos(2*pi*100*t)+randn(size(t)); [Pxx,F] = periodogram(x,[],length(x),Fs); plot(F,10*log10(Pxx))     If you do not have the Signal Processing Toolbox, the PSD is proportional to the absolute value squared of the DFT (calculated by fft()) SEE COMPLETE ANSWER CL

What is the difference between the Signal Processing Toolbox and the Filter Design Toolbox?

  I would like to know the difference between the Signal Processing Toolbox and the Filter Design Toolbox.   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. The Filter Design Toolbox builds upon the  Signal Processing  Toolbox by adding advanced filter design algorithms, fixed-point filter analysis and  simulation , multirate filters, and adaptive filters. Some of the key features for the Filter Design Toolbox are: - Design and analysis of filters from the FDATool GUI or from the command line - Advanced FIR filter design methods: generalized Remez, halfband, Nyquist, interpolated FIR, CIC compensators, inverse-sinc, minimum-phase, constrained-ripple, s

Can i plot spectrum of a signal in Matlab

  I want to plot spectrum diagram which gives the frequency content of a signal x(t) for example if i draw spectrum of x(t) = 14 cos(200*pi*t -pi/3) by hand it will be two arrows at -100 and +100 with values 7e^(jpi/3) and 7e^(-jpi/3)     Can some software or matlab can do this for me   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. Fs = 1000; t = 0:1/Fs:1-(1/Fs); x = 14*cos(200*pi*t-pi/3); xdft = (1/length(x))*fft(x); freq = -500:(Fs/length(x)):500-(Fs/length(x)); plot(freq,abs(fftshift(xdft)));     SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/can-i-plot-spectrum-of-a-signal-in-matlab.php

How do I display an image on a GUI component (eg. pushbutton)?

  How do I display an image on a GUI component such as a push button or axes?   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. To display an image on a GUI component, try these four steps:     1. Read in the image you want displayed on the component. 2. Make sure that it is a True Color Image. 3. Resize the image to fit on the component. 4. Create the component and set the 'cdata' property to be the image.     Below is an quick example of how to display an image on a pushbutton:     [x,map]=imread('ngc6543a.jpg'); I2=imresize(x, [42 113]); h=uicontrol('style','pushbutton',... 'units','pixels'

Why am I getting an error when I use grayscale images with "makehdr"in Image Processing Toolbox 8.1 (R2012b)?

  I am receiving the following error when trying to use the "makehdr" utility.   low dynamic images must be RGB     I suspect the reason is that my images are black-and-white. Is there any workaround for this issue?   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. "makehdr" works only on RGB images. The workaround for this issue is to convert the grayscale image to an RGB image. Grayscale images are 2D (m x n) matrices, while RGB images are 3D (m x n x 3) matrices. Therefore one must expand the 2D matrix to fill the 3D matrix. This can be accomplished a couple ways   1. Use REPMAT to replicate the 2D matrix 3 times.   % Step 1 - Lo

How to get classification results in the form of image?

  Hi,   I am a new user, struggling hard to learn classification using naive Bayes and SVM through classification Learner app. How I can get results in the form of image instead of confusion matrix of ROC curve, when I trained the SVM using classification Learner app., it shows confusion matrix/ ROC curve in result. Here I want to show the result in the form of image and same want to do through naive Bayes .   How I can do this Please help?   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. For svm refer     doc svmtrain doc svmclassify For Bayesian refer doc fitcnb doc predict   SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resourc