MATLAB How can I use MatLab for Chroma-Keying and replacing a green background?

AI Thread Summary
The discussion revolves around two main topics: superimposing a grid from a reference image onto other images and implementing chroma-keying in MATLAB to remove a green background. The user seeks guidance on extracting the grid from an image for calibration purposes, having already identified the central pixel coordinates and calculated distances between points. They aim to modify pixel values in the first quadrant of the image but encounter an issue with matrix dimensions in MATLAB. Additionally, a biology graduate student requests MATLAB code for chroma-keying to replace a green background with another image. The conversation highlights the need for technical solutions in image processing using MATLAB.
1Keenan
Messages
99
Reaction score
4
Hi,

I have an image (attached) I have to use as a reference.
To be clear I have to use this grid as calibration for an acquisition sistem.

I want to get the grid of this image and superimpose it on other images.
Is it possible? how to do it?

Thanks
 

Attachments

  • Calibrazione170112.jpg
    Calibrazione170112.jpg
    30.1 KB · Views: 659
Physics news on Phys.org
I managed to get the central pixel coordinates [X0,Y0] (using ginput) and the distance between two points (using imdistline).
I have converted the image in a gray scale using im2double and I want to change pixel value in the first quadrant. (image is almost black)
I mean I would like to set as white each pixel of every rows between 1 and Y0 with step equal to the distance calculated above and do the same for the column between X0 and 821.
How to do that?
(the image size is 577X821X3 double and MatLab says that 821 index exceeds matrix dimensions)
 
Hi ,

I am a biology major grad student and I am looking a Chroma-Keying MATLAB code for removing a green background color and replacing with another image? anybody with the code please share. Thank you so much.
 

Similar threads

Replies
4
Views
2K
Replies
15
Views
2K
Replies
5
Views
2K
Replies
3
Views
3K
Back
Top