Question

In: Computer Science

MATLAB code: using Laplacian mask enhance for image "ngc6543.jpg".

MATLAB code:
using Laplacian mask enhance for image "ngc6543.jpg".

Solutions

Expert Solution

This will be done by locallapfilt which will approximate the algorithm by discretizing the intensity range into a number of samples defined by the 'NumIntensityLevels' parameter. This parameter is used to balance speed and quality. The parameter is set to 100 here.

A = imread('ngc6543.jpg');

imshow(A)

%Using a sigma value to process the details and an alpha value to increase the contrast, effectively enhancing the local contrast of the image.

sigma = 0.2;
alpha = 0.3;

%The value of sigma and alpha can be adjusted to apply various filters on the image

B = locallapfilt(A, sigma, alpha, 'NumIntensityLevels', 100);

imshow(B)

Applying the above enhancements to the image:

Results in:

Hope this helped. Please do upvote and if there are any queries please ask in comments section.


Related Solutions

MATLAB CODE FOR E xtreme learning machine using for classification task. image processing electrical. if you...
MATLAB CODE FOR E xtreme learning machine using for classification task. image processing electrical. if you know then try or leave for other
Using Matlab 1. Create a color image of size 200 × 200. The image should have...
Using Matlab 1. Create a color image of size 200 × 200. The image should have a blue background. 2. Create 100 yellow regions within the image that have a variable size. More specifically, their width should be an odd number and vary between 3 and 7 and their height should also be an odd number and vary between 3 and 7. For example, you may get rectangular regions of size 3 × 3, 3 × 5, 5 × 3,...
Draw a Koch Snowflake fractal image using MATLAB programming. I'm pretty new to MATLAB and im...
Draw a Koch Snowflake fractal image using MATLAB programming. I'm pretty new to MATLAB and im not too familar with how all the plotting and drawing functions work.
I want to create an image compression program with matlab use PCA. I have the code...
I want to create an image compression program with matlab use PCA. I have the code listed below. But this code is fail, the image is colorless, but still gray. Can you help me to fix my code. clc clear all picture = im2double(imread('picture1.jpg')); Red = picture(:,:,1); premean = mean(Red(:)); premax = max(Red(:)); premin = min(Red(:)); x = size(Red,1); y = size(Red,2); Z = ones(x,y)*premean; A = (Red - Z)*(1/premax - premin); B = cov(A); [veceig,eig,C] = pcacov(B); NewRed =...
The following code must be written using matlab How to loop through a vector in matlab...
The following code must be written using matlab How to loop through a vector in matlab and assigning a value to every 4th entry. The vector could be of any length. Thanks
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft...
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft and dft. Applied to discrete signals. If you can with an example.Thank you!!
(1)Using the Matlab code developed in Software Assignment #1: a. Convert the code that generates the...
(1)Using the Matlab code developed in Software Assignment #1: a. Convert the code that generates the random number (H,T) with equal probabilities into a function called myBernolli(p, S) that takes as an input the probability of success p and S is the outcome defined as success (either T or H) and returns the outcome of the trial (either T or H). b. Test that your function is actually producing the successful outcome with probability p by running the function in...
I want the code for the 2D Ising model using Matlab
I want the code for the 2D Ising model using Matlab
Describe the process of convolving an image with a mask (kernel). How could the process be...
Describe the process of convolving an image with a mask (kernel). How could the process be implemented in the (spatial) frequency domain?
How to design FIR lowpass filter using matlab. Note : Do not write matlab code. Only...
How to design FIR lowpass filter using matlab. Note : Do not write matlab code. Only explain the steps of designing filter
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT