add multiple images to a video using aws mediaconvert - amazon-web-services

I'm trying to add images to a video using mediaconvert. I used mediaconvert graphic overlay/ image inserter to perform this task. However, the image is overriding the given video in the output for the given duration. I want the image to be still at first and then start the video from the beginning if I add an image and similarly for the rest of the images. Can this be done by using aws-mediaconvert?

Overlays are normally used for things like watermarks and logos or simple sports scores/news tickers etc. Images you want to appear over the top of the video.
You could create a clip of blank video to insert into your output, then apply the overlay to just that?
Another option is to convert the image to a video yourself with ffmpeg and insert that into your output?

Related

Elastic transcoder(HLS): generating playlist based on original video

I am developing a service which converts uploaded video to hls stream using elastic transcoder. uploaded video can vary the resolution. I have to generate streams based on resolution of video.
for example if original video is full hd(1080p) then I want to generate 240p, 360p, 480p, 720p and 1080p streams but if original video is 360p then i want to generate only 2 streams 240p and 360p since it wont make sense to generate higher quality by stretching.
I am able to define presets to generate fixed length playlist. How can make is variable based on video.
One way could be to make different presets and parse video to read resolution then choose presets accordingly. could there be some better approach or something provided by transcoder?
thanks

Capture a specific location of an image using OpenCV

I am trying to organize my trading card collection digitally and am working on building a scanner using ocr to detect the names of my collection.
I need to use a webcam to snap a single image of each card in question. Snapping the image doesn't seem to be to difficult, but I need help determining how to get OpenCV to capture only a specific part of that image for OCR to work with. I'm trying to capture just the text portion of the image so that the artwork on the cards doesn't interfere with the OCR.
If my card will be placed in the same physical location each time, is there a way to get OpenCV to take an image and focus on just the area of the image that I'm interested in.
Thank You
Sour Jack
I am not sure I understand the problem. Do you want to use your OCR algorithm always on the same portion of the snapshot? If so, you can try something like:
roi = img[y:y+height, x:x+width]
There is more information here: http://answers.opencv.org/question/29260/how-to-save-a-rectangular-roi/

How to make motion history image for presentation into one single image?

I am working on a project with gesture recognition. Now I want to prepare a presentation in which I can only show images. I have a series of images defining a gesture, and I want to show them in a single image just like motion history images are shown in literature.
My question is simple, which functions in opencv can I use to make a motion history image using lets say 10 or more images defining the motion of hand.
As an example I have the following image, and I want to show hand's location (opacity directly dependent on time reference).
I tried using GIMP to merge layers with different opacity to do the same thing, however the output is not good.
You could use cv::updateMotionHistory
Actually OpenCV also demonstrates the usage in samples/c/motempl.c

reading jpeg file based on Mirror Effect,Brightness and zoom Level

I am working on the gateway Simulator where Simulator will stream image/video to Data center
I have JPEG file for 30 min(lot of individual JPEG images).
Data Center Center can request video/Image with varying value of these parameter.
Image Option
1. Mirror Effect (None,Column,Row,Row / Column)
2. Brightness (Normal,Intense Light,Low Light,MAX)
3. Zoom Level (1X, 2X, 4X, 8X)
Capture mode
Single Snapshot- requests one image from the camera
Burst Number- NUMBER will gather N (1-65535) number of images from the camera
Burst Second-option produces a stream of images and will go until a CancelImageRequest command is sent
Continuous- option produces a stream of images and will go until a CancelImageRequest command is sent
Round-Robi-, is a mode to allow the user to get a single snapshot from each active and selected sensor
Schedule Continuous- THis is similar to Continuous except timing.
Now I need to read JPEG files based above mentioned option and send it to data center.
I wanted to how I can enforce these Image option while reading the data.
is there any Api which will allow reading JPeg imges on following Image option.
If you have any suggestion please go ahead.
GDI+ has an Image class that can load JPEGs and manipulate them -
http://msdn.microsoft.com/en-us/library/ms534462%28VS.85%29.aspx
If you don't find then manipulation you're looking for you can use the Bitmap class that ingerits from Image and the BitmapData class that allows you direct access to pixels
http://msdn.microsoft.com/en-us/library/ms534420%28VS.85%29.aspx

adding cliparts to image/video OpenCV

I'm building a web cam application as my C++ project in my college. I am integrating QT (for GUI) and OpenCV (for image processing). My application will be a simple web cam app that will access the web cam, show/record videos, capture images and other stuffs.
Well, I also want to put in a feature to add cliparts to captured images, or the streaming video. While on my research, I found out that there is no way we can overlay two images using OpenCV. The best alternative I was able to find was to reconfigure the whole image to add the clipart into the original image making it a single image. You see, that's not going to work for me as I have to be able to move the clipart and resize or rotate the clipart in my canvas.
So, I was wondering if anybody could tell me how to achieve the effect I want most efficiently.
I would really appreciate your help. The deadline for the project submission is closing in and its a huge bump on the road to completion. PLEEEASE... RELP!!
If you just want to stick a logo onto the openCV image then you simply define a region of interest (roi) on the destination video image and copy the source image to this (the details vary with each version of opencv)
If you want the logo to be semi transparent - like a TV channel ID - then you can copy the image but loop over the pixels writing a destination that is source_pixel/2 + dest_pixel/2;