how to select particular minuate in finger print image and then convert to hexadecimal code ...

1 次查看(过去 30 天)
after ridges and bifurucation i need to selct the singular point of the image and check the integer value

回答(1 个)

Vaibhav
Vaibhav 2023-10-18
编辑:Vaibhav 2023-10-18
Hi Sravani,
I understand that you would like to pinpoint a single spot on an image and then convert the value to hexadecimal code.
One of the approach can be using "ginput()" and "dec2hex()" functions.
  • The "ginput(1)" function allows to interactively select a point in the image.
  • Convert the value of the selected point into hexadecimal using the "dec2hex" function.
Check out the code snippet below for using "ginput" and "dec2hex":
% Load an example image
imagePath = 'peppers.png'; % Replace with the path to your image
originalImage = imread(imagePath);
% Display the original image
figure;
imshow(originalImage);
title('Select a Point');
% Use ginput to interactively select a point
disp('Select a point on the image...');
selectedPoint = round(ginput(1)); % Get the coordinates of the selected point
disp(['Selected Point: ', num2str(selectedPoint)]);
% Extract the intensity value at the selected point
intensityValue = originalImage(selectedPoint(2), selectedPoint(1), 1);
% Convert the intensity value to hexadecimal
hexCode = dec2hex(intensityValue, 2);
% Display the results
disp(['Intensity Value: ', num2str(intensityValue)]);
disp(['Hexadecimal Code: ', hexCode]);
You can refer to below MathWorks documentation to know more about "ginput" and "dec2hex":
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by