How to get image coordinates and color data per pixel clicking on a displayed image? - matlab

I loaded several PNG files into Matlab and displayed them with no problem but was wondering if there is a way to point (or click) on a pixel and immediately get its pixel coordinates and color (RGB), in real time, either as an output on-screen or stored in some variable.
For example, I have a 64 x 64 face photo to serve as a ground truth image for an eye detection algorithm. The algorithm will return the bounding box for an eye, but, to check it, I want to manually extract coordinates by clicking or mousing around the image as it is plotted, and also color information about the pixels on which I click or mouse.
Please feel free to suggest another language, software, or environment if Matlab does not support such interactivity.
Thank you for your help!

The Data Cursor does exactly what you want:
http://www.mathworks.co.uk/help/matlab/creating_plots/data-cursor-displaying-data-values-interactively.html
It is the icon to the right of the "rotate" icon in the image toolbar.

If you have the Image Processing Toolbox, there is a built in tool called impixel, which will allow you to click on an image and get pixel values and location automatically. There is no data cursor that pops up, but what the data cursor is returning, impixel is also, and you could easily display this with a uicontrol (text).

Related

Camera Calibrator Matlab

I'm using the camera corrector application to correct a series of images that have barrel distortion using chessboards.
Following the steps below:
1.I attach the series of photos to be corrected with the different positions of the chessboard, without modifying the position of the camera.
I introduce the size of the different squares that make up the board. And frame that has a high distortion the image to process
enter image description here
I perform the processing of the different photos and press the calibration button
enter image description here
Detect the different points of the chessboard
enter image description here
And I hit the "show undistorted" button. To see the result of the correction.
enter image description here
Apparently the image is corrected. But using a photo correction program, I observed that this is not the case, that there are errors in its correction.
enter image description here
it is observed that the upper right corner is not fully corrected. I have carried out the same procedure with a smaller number of photos, with a different location of the chessboard, etc. I am somewhat confused. What could I do to completely correct the image?
enter image description here

detect coordinates of some element on image

Please tell me how to solve this problem.
Where to start and which way to go.
I have an image with some buttons :
How can i detect coordinates of blue round button for example?
The difficulty lies in the fact that these are not application buttons, but just a picture on the desktop.
I understand that this is a vast and complex question, but tell me at least the right way.
It will be useful to many people.
The first thing I can imagine is to do a desktop screen, and then try to detect pixels with blue color.
You don't need to do manual image detection because Apple's vision framework already does this. You can use it to detect rectangular regions, detect text, or recognize and image within an image, depending on your needs.
See Detecting Objects in Still Images

Extracting measurements from a finger via ROI and image processing MATLAB

I am trying to do a number of things via MATLAB but I am getting a bit lost with what techniques to use. My ultimate goal is to extract various measurements from a users fingerprint presentation, e.g. how far the finger over/undershoots, the co-ordinates of where the finger enters, the angle of the finger.
In my current setup, I have a web camera recording footage of a top down view of the presentation which I then take the video file and break down into individual frames. https://www.dropbox.com/s/zhvo1vs2615wr29/004.bmp?dl=0
What I am trying to work on at the moment is using ROI based image processing to create a binary mask around the edges of the scanner. I'm using the imbw function to get a binarised image and getting this as a result. https://www.dropbox.com/s/1re7a3hl90pggyl/mASK.bmp?dl=0
What I could use is some guidance on where to go from here. I want to be able to take measurements from the defined ROI to work out various metrics e.g. how far a certain point is from the ROI so I must have some sort of border for the scanner edges. From my experience in image processing so far, this has been hard to clearly define. I would like to get a clearer image where the finger is outlined and defined and the background (i.e. the scanner light/blocks) are removed.
Any help would be appreciated.
Thanks

Create Mosaic on image

In image app i have to blur the selected areas of image. Something like create mosaic at selected area of image. i have to get each pixel color of selected area and then increase the size of each pixel. here is the reference link that i am using http://soulwithmobiletechnology.blogspot.in/2011/05/create-mosaic-with-your-image-part-1.html . But not able to implement this practically for selected area. Can any one have some sample for the same.
There are two solutions for this
1. Get the screen shot of the area where you want the mosaic effect and apply effect to the same portion. Then add the image(with mosaic effect) to the original image.
2.Get the pixel of the area you want to be effected and then gave effect to those pixels.*

iphone app developement: How to manipulate a selected area of an image?

The function I need to implement is like this:
1> select an small area of an image. This small area could be various shape, not only rectangle.
2> manipulate this area. for example: blurring
Is there any way to do it?
Thanks.
You've got your work cut out for you. Here is one way to do it. Make the selection. Whether you do it with CG paths, or some other way, you want to take the selected image, and make all the unselected area have an alpha of zero. YOu can accomplish this with blendmodes.
Then get the pixel data. See: http://developer.apple.com/mac/library/qa/qa2007/qa1509.html
Then you go through the data and anywhere where your alpha isn't zero, you average the pixel with the pixel one before it, one after it, one above it, and one below it. Of course there are many different ways to blur and this is a poor man's routine.