I'm new to opencv .My requirement is that in a video by giving an input image it should tag every occurence of the image in the video using opencv. Any help would be much appreciated.
You can try with OpenCV Template Matching
where you have to extract each frame your video and apply Template Matching.
You can see OpenCV video tutorial here. Also see OpenCV documentation Reading and Writing Images and Video.
Load the input image in a global cv:Mat.
Scale this image appropriately, make this the template image(or Mat).
First load the video, then extract each frame out of it and store in a local cv::Mat.
Run template matching as suggested in the tutorial given by Harris with the local frame.
If match found, mark the frame and position using some GUI or color whatever.
Repeat process for next frame.
Related
I currently have an API route in nodeJS generating images from given inputs and then creating and returning a GIF from these images. I'm using gifencoder and canvas to do these operations.
I need to generate a mp4 video instead of a GIF for this route, so I've looked at different solutions, but none suited me:
Converting the GIF to an mp4 with an ffmpeg, seems a little "heavy" and ffmepg need an image path on input to perform this.
Using the image data from canvas to directly feed the videoshow module, less heavy, but it still need images path.
I'd like to not save temporary images for this operation and having a straightforward process like :
"Informations > ImageData > Video".
Do you think it is doable ?
I'm doing a custom game which I'd like to change the background and a character picture according to a file they upload.
The input file is outside phaser. If possible, I'd like to show the picture directly without uploading to the server.
If you use a file loader to get the base64 encoding of the image, you can use this.textures.addBase64 to load the image into the texture manager, after that loads you can create new objects with that image tag, or set existing images to that texture.
Working Example =>
https://stackblitz.com/edit/phaser-use-uploaded-image
Can I use TTML to create cue that link thumbnail image file coordinates to a range of time the thumbnail represent.
I would like to use TTML to create the cue reference of the thumbnail sprite image created for a duration of the video.
I am aware that this can be done using webvvt, but wanted to check whether this can be done for TTML.
Regards
I've been searching through the vtk documentation but I cannot see how I can use a PNG image with a vtkFollower.
In order to do so, I seem to need to obtain a vtkMapper with the image data. However, there does not seem to be a mapper for this purpose (i.e. loading of images).
How can I get a vtkFollower of type image?
Note: vtkFollower.SetMapper expects vtkMapper. Since vtkImageMapper does not inherit from vtkMapper, using vtkImageMapper is not possible.
You have to use PNG reader and pass it to texture.
Then, In vtkfollower object "settexture" should be called.
Please refer to links below.
https://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/PNGReader
https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/TextureMapPlane
https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower
I need some help on an issue that I am having overlaying images on a live feed.
Currently, I am streaming raw data from a device, transcoding that data (i.e. ogg) and then re-streaming using HTTP because I need to view through an HTML page. My problem is that I need to overlay an image on the stream where - when a particular object moves - the image overlay moves as well.
For example, if you wanted to place an 'X' over a moving object where that object may move left-to-right or top-to-bottom. At this point, I am able to overlay the image at a fixed point using the following command:
ffmpeg -i rtsp://[host]:[port] -i x.png -filter_complex 'overlay=10:main_h-overlay_h-10' http://[host]:[post]/output.ogg
This will give me an 'X' over the object at the start but, once the object moves I need to change the position of that 'X'.
The only real requirement is that the technologies that I utilize need to be available for Linux.
Any ideas ?
Thanks !