No video

Reading Video Files With Matlab For Image Processing

  Рет қаралды 16,988

CodingLikeMad

CodingLikeMad

Күн бұрын

Пікірлер: 31
@abidmehmoods
@abidmehmoods 5 жыл бұрын
doing a thesis on this topic... really helpful video. Thanx
@faranjadoon4622
@faranjadoon4622 3 жыл бұрын
excuse me i need help regarding this topic
@Schubs
@Schubs 4 жыл бұрын
This was great! Thank you very much - I would love to see more!
@algola7024
@algola7024 Жыл бұрын
Wow -This is great content. I appreciate your work into this.
@CodingLikeMad
@CodingLikeMad Жыл бұрын
The humidity in the region of my socks is increasing rapidly.
@harshgarg4438
@harshgarg4438 2 жыл бұрын
Liked the video, can you make a video on how to get object speed like car on highways using matlab.
@FelTContreras
@FelTContreras 4 жыл бұрын
very good job :)
@crazyishwarya479
@crazyishwarya479 4 жыл бұрын
Could you please upload a video on facial expression detection using MATLAB...
@hamedmmsulimanSuliman
@hamedmmsulimanSuliman 4 жыл бұрын
Please, I need to calculate a speed of moving object. Can you help me please.
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
Hi There, I'm not sure how much help I can be, but I will try. I assume since you are commenting on this video, you have video of the object that is moving. If it is not moving at a right angle to the camera direction, it will be very difficult to get any useful information out. The general approach you want to use for this is to assume that the speed of an object is constant (briefly) between two frames of the video. If you have a lab setup, you can take video of the object with a reference next to it. These look like rulers basically, usually black and white, with known spacing. You can then just measure how many pixels per marker distance (so if 10 pixels = 1 marker, and 1 marker = 10 cm, then 1 pixel = 1 cm). You can then use the frame rate of the video (accessible from the video format, or the video object, as described in this video), and just divide by the time 1 frame takes (or just multiply by the frame rate, it's the same thing). Now if you don't have a reference, you have a whole different problem. You need to generate one somehow. If you known the size of the object, it can be it's OWN reference I think actually (this is how human eyes work - it's why a fly looks like it is moving very fast, when in fact it is still walking speed). Another possibility is to work out the field of view of the camera after the fact in degrees per pixel, and then estimate the distance to the object and work out the remaining side of the triangle. Another option is to use known landmarks which happen to be nearby. So if you were trying to figure out how fast a car was going as it sped past your house, you could use road markers that you measure the distance between for example. Anyway, giving more general advice is probably not helpful, but those are my thoughts on how to do what you asked. If you are asking about non-video motion, probably the easiest thing is record it on video as above :p Good luck! -Kyros
@Schubs
@Schubs 4 жыл бұрын
Sorry to comment again, but what would I need to change in my code so I could do image processing with the frames? In my case I have an expanding circle I have a formula to calculate the area for, but I want to inject that into my loop. can I directly inject it into the loop as the code stands?
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
You should be able to process each frame in the loop as it's loaded. For large files this is virtual ly required as you will run out of memory. For small files you can load and store each frame and then work on the data cube.
@alonso7327
@alonso7327 3 жыл бұрын
Great video, thanks so much, do you know how to get some plot from the video?.
@CodingLikeMad
@CodingLikeMad 3 жыл бұрын
To make a plot, just calculate per frame whatever you are interested in, drop it in a vector, and then plot at the end after all frames are looped over. Thanks :)
@rohankulkarni5386
@rohankulkarni5386 4 жыл бұрын
Can I transform the frames and then display it. So I am looking for a technique where in I want to have a bird's eye view of the video. I am planning to extract each frame and then use the perspective transformation method to transform the frame in top view format.
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
Hi Rohan! You can indeed transform the frames and then display it. The frame that is grabbed and then imaged in the code is a 3 channel (RGB) image, you can do whatever you like to it once it is extracted, including applying a technique which adjust perspective. I don't know anything about such techniques though, but the raw data can be collected and manipulated for almost anything you want to do using the code in this video. Goodluck! ~Kyros
@oldacc2508
@oldacc2508 Жыл бұрын
Idk why but i wrote the same script to just play video but for some reason it's only plays 1 frame per 5 seconds, readframe taking too much time and I don't know why! Myabe it's because matlab installed on hdd instead of ssd? But i dont have free space on ssd.
@oldacc2508
@oldacc2508 Жыл бұрын
I got 1920x1080 29fps video, maybe it's too much, i tried 1280x720 29fps, it's slow too
@CodingLikeMad
@CodingLikeMad Жыл бұрын
Is the video itself on the ssd? That may help. Otherwise I'm not sure.
@akilandeswari.p4205
@akilandeswari.p4205 3 жыл бұрын
Sir pls upload the video for removing rain and snow particles from the video and the output have video with out any rain particals using matlab function
@CodingLikeMad
@CodingLikeMad 3 жыл бұрын
That sounds like a really cool project! Unfortunately, I have no idea how to do with matlab functions... I think I could imagine doing it with neural networks using pixel mapping? Boy what a tough project though. Sorry I can't help, good luck! Let me know if you figure out how to do it!
@xallen22
@xallen22 4 жыл бұрын
Could this be used to receive a live feed from a camera? Or does the video have to be saved to the computer first?
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
You absolutley can, either using the figure loop I show here, or the preview command as discussed in the video :)
@xallen22
@xallen22 4 жыл бұрын
CodingLikeMad okey, cool! Would it work wirelessly as well? I mean, if I want to transmit a live video from another room and receive it to matlab
@xallen22
@xallen22 4 жыл бұрын
CodingLikeMad And do you think can I use this for the transmitting side as well?
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
The webcam interface is usb based. I'm not familiar with any way to this wirelessly, with this setup, but there might be some kind of wireless usb bridge? Let me.know if you find one :)
@khadizatunsuha1999
@khadizatunsuha1999 4 жыл бұрын
Can you please show how to select region of interest in a video . I have tried doint it. But it is not working inside a loop ,the same frame is showing for the entire video...
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
In the video I copy the image frame to a temporary variable. This is essentially an array, and you can crop it directly by selecting a region of it, ie, temp = vid.readFrame() temp = temp( 200:400, 300:600, :) imshow( temp, 'Parent', ax) At least, I think that should work, let me know if something goes wrong.
@kammelna
@kammelna 4 жыл бұрын
Hi, Thanks for sharing. I have a dataset that contains 64 columns and 46 rows when converting each row to an 8*8 matrix I can see a picture or a video frame. Now I have done this conversion and data became 8 columns by 368 rows, but I don't know how to read the data as a video. the data set is for classifying human activity, can you please assist with this? Many thanks
@CodingLikeMad
@CodingLikeMad 4 жыл бұрын
Hi Kammelna, It sounds to me like you don't really have a video file per se, but rather someone has already converted the video file into a matrix for you, and then smushed the 8x8 frames together into one giant matrix and handed you that. What you do next depends on how you want to work with the data, but probably the right first step is to make a routine that generates those 8x8 frames, and saves them into a matrix with the correct dimensionality. IE, something of size [8,8,1,46]. You can do this potentially with the reshape command, or just a for loop if it is easier to write and you don't have the speed concerns(it sounds like you mostly already have this). A matrix like this is actually already appropriate for feeding into tensor flow for classification of images actually, if you have access to the deep learning toolbox: www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html (although with only 46 samples this will be likely impossible to use productively). Just my thoughts on how to handle it. Each image is accessible via a command like img(:,:,1,index), where index = 1 to 46. You may want to apply a squeeze() operation to deal with the singleton dimensions. Also, I'm assuming your images are grey scale here, otherwise the size is [8,8,3,46]. Best, Kyros
@kammelna
@kammelna 4 жыл бұрын
CodingLikeMad Hi Kyros, Thanks for your quick response. Yes you’re right the dataset is given as you mentioned. As for the 46 samples, they are only for one activity and there are 9 activities in total, also the same activities are performed by 6 different subjects. So in total I think the samples are around 55K. Thanks for your suggestions and Will try them. Regards.
Getting Started with Image Processing
13:08
MATLAB
Рет қаралды 78 М.
Recursive Particle Tracking - MATLAB
25:02
Scientific Coding
Рет қаралды 9 М.
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 3,1 МЛН
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 37 МЛН
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 354 М.
Image Processing Made Easy - Previous Version
38:40
MATLAB
Рет қаралды 501 М.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 209 М.
Creating Movies and Animations in Matlab
27:01
Christopher Lum
Рет қаралды 114 М.
Image Processing Made Easy
31:15
MATLAB
Рет қаралды 23 М.
How to convert video into image frames using MATLAB?
13:45
Xplore Japan 360
Рет қаралды 3,8 М.
Video Coding Basics - How is this so efficient?
40:21
Christian Feldmann
Рет қаралды 7 М.
Anonymous Function Handles In Matlab - Advanced Matlab Tutorial
11:15
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4 МЛН