How can I render a moving circle over a video which positions itself based on data from a text file? - matlab

I have some video (.mp4), and some text data which includes the XY coordinates of a circle that I wish to draw over the video's frames and render a new video.
I have been able to do this in MATLAB using the computer vision toolbox, however the formats of video I can use are extremely limited... I need another method.

Use the insertShape function in the Computer Vision System Toolbox.

Related

ImageJ : Overlay 2 Images When One is Distorted

I am asking for a step-by-step process with the appropriate plugins (I have been attempting with multipoint and landmark correspondence). Please include images in answer if possible.
I want to overlay two scientific images
The images are not oriented the same due to distortion of the second image from collection at a 45o angle and the object was also at a different orientation (flipped horizontally and slightly rotated)
In Adobe Photoshop I transformed the distorted image to overlay with the
first image by eyeballing the match as you can see below but I am having
difficulty using ImageJ to perform this overlay. I have been told that my
eyeballing method in Adobe Photoshop will not be sufficient for my methods
section of my manuscript and that I must use a scientific program such as
ImageJ.
I tried to follow instructions from the ImageJ forum for Multipoint and Landmark Correspondence but it does not overlay the two images or transform the second image to match the first. Rather, it distorts a portion of the second image and appears to crop the rest out.

Superimpose masked video onto video in Matlab

I currently have a video that has been selected out with a mask and saved as a separate video. The surrounded regions of the mask are all black. I want to superimpose this mask video onto another video of the same dimensions, replacing the black pixels with the pixels in the underlying video. Is this sort of thing possible in Matlab?
Any help would be greatly appreciated!
One easy way out could be to extract frames from both the videos and replace all the black pixels of the first video with the corresponding pixel values from the second video.

Correct Video for lens distortion in Matlab?

I have a video that was taken with a GoPro and I would like to get rid of the fisheye distortion. I know I can get rid of the fisheye with the gopro software, but I want to do this using Matlab instead.
I know there's this http://www.mathworks.com/help/vision/ref/undistortimage.html that applies for images, however, how would I apply it for a full video? The number of frames in the video 207 (it's like 5 - 6 second short video).
Thank you very much!
Can't you just sample your video stream at 24fp (using e.g. ffmpeg, see here ), apply your Matlab routine one frame at a time, then rebuild the video stream in Matlab itself?
You can apply undistortImage to each frame of the video. If the video is saved to a file, you can use vision.VideoFileReader to read it one frame at a time, and then you call undistortImage. Then you can write the undistorted frame to a different file using vision.VideoFileWriter, or you can display it using vision.VideoPlayer.
Of course, this is all assuming that you have calibrated your camera beforehand using the Camera Calibrator App.

Opencv open 3d stereo video file and output to display

is there anyone working on extracting the data from a 3d stereo video by using opencv? (e.g. 3d blu-ray). From some documentation, it stated .avi is the only supporting video file format on opencv. If there you are or you know, would you mind to give me a tutorial how to do that. (e.g.A frame of a 3d stereo video should be an image of 2 views plus one depth map? or A frame of a 3d stereo video is 2 images of 2 views and some depth maps?) How to read the information?
An other question is, is there any API in opencv can control the output from the graphic cards ports? I mean if I have a graphic card with two DVI ports, would it be possible for the monitor connected to A-DVI display the left-sided image of the 3d-stereo video while B-DVI display the right-sided image.

MATLAB video capture & image processing without the Image Acquisition Toolbox

I would like to capture a live video in MATLAB and take picture frames from it, upon which image processing will be done to identify certain colours in the environment
I do not have the Image Acquisition Toolbox, I only have Image Processing Toolbox. The methods I know use the Image Acquisition toolbox functions.
Try these fex options:
Simple Video Camera Frame Grabber Toolkit
VCAPG2
Video Adaptor device (webcam) setup for MATLAB