Matlab Programming - Episode 6 - Photo editing with for and if loops

Matlab Programming – Episode 6 – Photo editing with for and if loops



hey viewers welcome to another episode of my metal a programming course we are at Episode six here and today we're going to see our first program using only for diff loops and a little bit of extra stuff do that you haven't seen before but I will explain it is kind of stuff that has to do with photo editing because that's what we're doing today so after we did an image we have to well open the image we have to display the image we have to do all kinds of stuff basically that you will see but it's all about before and if loops today and how you can actually use them in a program so let me first clear this crap because I kind of forgot to do that yeah this is not the first time I started this one so the problem is my f9 and f10 buttons have been blocked which is step and well posting things from here to the command window so I'm going to have to do that manually which means clicking a lot of buttons first of all we're going to start off with CLC clear and close all if you put a semicolon in between those you can put them all on one line because the semicolon says this is the end of the commands and a new command to start and now normally you would start on the next line but you don't have to do it so you can't actually put them all in one line and I get that right here so you're going to clear this that's the CLC the killer will clear out the workspace which is right here there was nothing in that and close all will close all the figures that we're now friggin open for the moment but we will see that later that it is actually useful so then we're going to load in our first photo our photo is called photo not Jeep jpg so a JPEG and as you can see we are using it read for that and if you want to use em wreaked and you were wondering what does it do you can type higher help em read you can also and greet this because this is quite a bit of text by the way so it might be more useful to use for example dark duck in Reid and then you get the whole document but as a separate file which is way better to well read it yeah it's just better than having it just as text and the final one I already discussed all of this but is hitting the f1 button and will pop up em read as kind of a quick help file I guess and that is useful as well so you can see how to do it for now I'm just going to tell you this is how you do it because it doesn't matter yet so in read photo JPEG and that is going to be loaded into our variable pixels and pixels is going to be just loaded now with all of those numbers so a photo is basically three colors which is the last variable in this thing you see here you have a length height and an amount of color so basically you have three different colors that are mixed together than in one image and yeah so you can see here the first one is the Rose the first number the second number is the amount of columns yeah that's true and the third one is the amount of well layers you have color layers in this case three and as you see behind it it says you int AIDS you and eight means that it has a bit depth of 8-bits of eight means that we have 262 nodes and fifty-six numbers that we can store in it and since it runs from 0 to 255 that is exactly what we expect so if I look at this we can actually look at it here by double clicking it you can see you can open it it says it's too big but you can actually see parts of it if you wanted to we're going to use this this matrix because it's an enormous matrix it's 3d and yeah it has a lot of data in it so we're first of all we're going to get the number of rows in our picture and those are basically the length of all the rows and the first column so I'm using the first column and selecting all the rows that's the colon there and then only using color one because otherwise it becomes a 2d array and I don't want that and basically if I watch this so if I copy paste this it is just a whole bunch of numbers but as you can see it's a column vector it's only one column and a lot of rows and if I want to have the length of that then it's going to give me one number and one number only and that is the amount of robes that are available so for the columns number of columns I do exactly the same thing but I used only row number one and then all the columns and then color number one you can also use color number two or three or I don't care but yeah the same thing for both of these these variables so I'm loading them in it says 532 rows 800 columns which is exactly the same as we saw here only now I have them as variables so I have those numbers they get subtracted from the matrix itself so if I change the picture then or the photo I should say then it will give me the right number so if you put in well like 800 and 532 there then if I can see further I have to change the numbers I don't want that I want this to be flexible because I'm I want to copy/paste it for my next example which is exactly what I did and you will see that all of the examples start like this so we are going to continue on and we're going to step through all of this hang on we're going to do that a little bit differently there you go I'll bring it up there you go dad is our picture and I will explain to you what it is first of all well figures so I'm using figure 1 which is what say what's posted in the top left this is figure number 1 you can have like 65,000 figures so you can basically choose whatever number you want I do recommend that you give give it a number you can also just do figure like this but I do not recommend that because then you cannot go back to it and well get data from it or post new data in it so if you give it a number you can address it as figure 1 and you can do that throughout your entire program so that would actually be very useful but as I said you can also just use figure it will open the next number so if one is already open it's going to take two and if a hundred is already open it's going to take a hundred someone anyhow subplots is a way to do this to get multiple plots in one figure normally one figure is one plot subplot works as follows if two rows you have two columns and this is position number one two three and four so as you can see one is top left two is top right three is bottom left four is both right I have titles on them but every subplot can have their own title as you can see full color red green and blue so you can see the different color channels of your picture basically then we are going to pick a method here because I actually programmed it so we have different methods to to do our thing yeah we're going to you have to please start this unfortunately run through this and it's going to sting once again no no bad picture yeah method is one which means we're going to go with method is one I have an if loop here I have three different methods methods one method to method three and I'm going to use one first so one as it says that it is going to use the average value here you can see what happens if you just take red green and blue I will show to you this is if you just take red and use that as your color spectrum basic this is if you use green this is what you get if you use blue yeah neither of those really like stands out but you can see the difference there's a lot less red and a lot more blue in the in the sky for example so you may want to choose green for example because it's kind of an average on the other hand blue gives you more of a sunny day feel and red gives you more of her well we went out at night field so we're going to run through this and we will see that it will pick method number one this by the way is done to prevent an error well not an error a warning because we're going to use the not the pixels themselves we're going to make a new matrix and plot our new values in that basically we want to keep our original values intact and we're going to use a different one a different matrix to put all our new values in and then compare the two in yet it doesn't really matter for now you can just forget it you will get an error if you don't do it but unless you work with really big photos it doesn't matter too much so what we're doing here is we're going to go with method 1 and I shouldn't press that because then the recording stops so for row number 1 to number of rows and this is why you needed to extract the number of rows and from 1 to the number of columns it's going to run this and it's going to say the value that I put in my new matrix is the average of the three colors as you can see it using row color columns or a row column for each of the three statements here and on one two and three for the three colors so that's red green and blue it's going to take the average of that mean you can also just add them and divide them by three of course also do it manually but mean is one of the functions that you get and then I'm going to put that into the red Channel in the blue chair puts well the new value so this this value is going to be put into the green channel and in the blue Channel so all three values will be the same making that you only have gray well accents which means well that's what you do if you make black and white so i'm i hope that's that's clear what it does and if i run it then we're going to skip all the way to here of course and it will take a little bit of time taking a lot more time than it normally does but that's quite all right it will eventually stop doing something yeah it is done normally this takes like half a second I don't know why it's freaking out and then we're going to open figure number two as you can see just a different figure and it says figure number two and we're going to say well let's see what it actually did so um oh did I screw it up here yes because I I worked with I worked with with doubles I calculated things with it it's no longer you and eight it's no longer an integer so I need to put it bring it back to an integer so you have to table you and eight before it otherwise it doesn't work and you get a white screen or black screen both of which can be possible so I'm anyway this is what the picture looks like that just yeah look at it it is kind of equal to the green one but it has more clarity and it has a little bit less of those it still has those those black edges in the corners that's just because they use the crappy photo camera to capture this because that means that your where your corners are going to be darker than the rest so there's not a whole lot I can do about it right now I can of course do everything about that if I wanted to but you can see it's it's resulting in a reason picture it's not bad anyway we're going to save this and we're going to do method is to and do exactly the same thing over so did clear or close all of the pictures all of the figures and now we're going to do method is to method is to is the maximum value so is it going to take the maximum value as it says here from the three colors and put them in all three channels that's as simple as it is it's the exact same thing as before and we're going to have to see what it actually results in because obviously it's going to be a little bit different from what you have we had previously and there you go as you can see the air is a little bit brighter here the faces are a little bit brighter so there's less contrast and there's a it's it's just the colors are not a maximum of each of the colors of course you can do the same thing with minimum values and that is method number three it's kind of lame but hey that's what it is I'm just showing you what it does I'm not saying that this is the best way to do it what it's figure 1 bug so we're going to run through all of this as you can see minimum values are not as min and it is once again call it 1 2 & 3 and then we're going to see the results in this next figure come on know you want to and there you can see because I've depicted minimum value the darker the air now is very dark so the air is basically the red air because the red is way worse than the blue and way worse than the green well the green is pretty bad as well but it is just a red air basically but these are no very high detail there are a lot of contrast in it you can actually see all of the veins in the stone and all in all if you combined rights well algorithms basically you can make a much better picture from your original picture and well in this case make it black and white we will see some other things in later stages but you might have noticed that well you cannot really compare the three pictures now I showed you three methods one two and three all three of them resulting in a different thing but you can't really compare them because they're never there at the same time so we're going to go into example two and fix that because here we're using a for loop for the methods so keep in mind we now have four loop in that there's an if loop in that there's a for loop and in that there's not a form so we have four loops inside of each other and that for each of the methods so in total it becomes kind of big keep also keep in mind that if you selected the wrong methods I now have an error message so if I were to do method is for yeah if I do method this for and just run this then it will say error and method selection because there is no method selected well there is a method selected but it's not good it's not a good one so I put that in there just to give me a warning every time as or when something well is entered that is not one two or three for this one it doesn't really matter because I can see that it's one two three but well in bigger if loops or sorry for loops or if loops whatever you may want to include that just to make sure that you're not running into trouble because you entered the wrong value you want to have full clarity of what's going on anyhow now we have methods one two and three and as I said they're in a for loop so what does the for loop do it runs with the variable methods so method is going to be first one then it's going to run this if statement so it does statement and it's going to go to figure which was on the end of our program before and it's going to make a figure with the number method plus a hundreds which means that if method is one the figure number is a hundred and one five methods is to 100 and 200 methods is three hundred and three thank you combines dirty went eight here before the picture the picture before I plot it because I didn't know that I should do that I just didn't do it in example one for some reason yeah so it's going to run three times once for method one once for Matthew once for methods free then it's going to say well I'm done here and we're going to put a stop right in the end there there you go so we're going to run through this entire thing and see what happens at them it's going to take a moments to your to process obviously this shouldn't if you're not recording this shouldn't take more than like a second but since I'm recording now and I'm yeah I have a lot of crap in the memory and this might actually take a while so figure one is going to stay to say you guys figure one i only plot that outside of the de for loop so it's plotted over here in the top and I'm never touching it again so yeah it's kind of easy to see so I do have all of the figures now this is number two and then number one so we have 1 2 3 and you can see the differences in the sky for example very bright sky very well average guy and very dark sky but you can also see the differences in the details so if we look at the shadows the shadows are much deeper in the minimum value and they are in the maximum value which is this one all you can pick different algorithms and say for example if blue is the main color because most of it is great so it doesn't really matter I mean most of it is almost great so if the main color is blue and it's well above everything else I want to have well for example this one or this one whatever you want you can you can just make it up you can select different regions of the photo with that or different colors should be amplified in different ways all you can do whatever you want with it it is just a method to show you how for an influx work and this is not to tell you how you should be doing photo editing because well that's not this is not the way obviously you want to pay big the whole photo and just edit it in one go only but really not the problem here then we're going to example number three and I kept all of the figures open just to show you what this close all crap does you know run through that and we're going to run this and as you will see it will close almost the figures there they go so CL see we already saw that clear we already saw that but close all I hadn't demonstrated it yet it just closes all the figures it's easy enough so we're going to start at number one I obviously had to try them out and that is why there's something there so um yeah once again we're reading in a picture this time is called underwater dot JPEG and it has a number of rows number of columns and we will show the photo in figure number one there it is so as you can see ya and I'll run this one that's a clear vision of what it actually is it is not a wonderful photo so it's completely blue and as you might notice there is a little bit of plant life over here I didn't really select this photo but yeah it's just a photo normally planned life as you can see becomes way too blue on these pictures so what we want is we want to have that that plant life to be green and the skintone to be back a little bit this is by the way your very bad picture this is a terrible camera which these guys have but well we're for the demonstration here it should be good so we split it into red green and blue once again so here you can see full color red green and blue on line and large it a little bit and as you can see blue is super way too bright red is super way yeah under lit under lids and yeah the green is the only one that's kind of average so we're going to make use of that those facts and added to the photo based on that so basically we need more wrap we need less blue and the green is okay what we're going to do is we're going to set up a new matrix that's what and we're going to turn pixels into a double so pixels is our photo and we're going to turn that into a double because if you multiply or add based on this and especially subtract then you're going to run into errors if you keep it as a un8 because you and it cannot go below zero and also cannot go above 255 so that is a problem of course because we want to or and and they're all integers we want to multiply here by 0.8 in this case and yeah it's going to run into trouble so don't do that I keep in mind you do have to switch back to you and eight later on to make sure that you can actually plot it but those are those things so making it a double or you and eight is really something that doesn't happen a lot unless you want to work with pictures because normally you don't work with unsigned integers or something like that you virtually always work with doubles so we run the the calculation here what the calculation does is for the red channel which is this one so the new red channel is going to be 0.8 times the old red red Channel plus the green Channel so we have the this is the first thing that's done it adds the red Channel and the green Channel and because the red Channel is well there's a leech slides data in that it's going to do that times 0.8 to make sure that it doesn't get too bright and then basically it well it's a it keeps the other two things the the green will still be the green and the blue will still be the blue so just showing you what this results in yeah let's run it there you go so as you can see if I put them under each other the red channel is now much much better than the old red Channel it still may but may not be perfect but you can also see that the photo itself just looks way more natural it's not that super bright under water color that you get from crappy cameras because there's not enough red light in this which we could see from the red Channel there's not enough red light penetrating the the water and that is why it becomes so blue in reality our eyes do not see that as blue our I see water as almost just transparent completely colorless and so this one is much better you can also see that the orange in a bathing suit has returned and apparently she has red hair and you can see the orange here has returned also the green here is now actually green whereas the rocks are just great so it becomes a lot better colored now well as I said before this is a very crappy picture but we do have better pictures so we're not going to change anything oh I will show you the final picture there it is so you can see it full screen so as you can see the colors in the bathing suit have completely returned the the green has returned and yeah for the rest it's just old gray rock so there's not a lot of color to return so how do I know this is the right one so if we do another picture we're going to underwater tooth and I will just get all of the breakpoints out because well we've seen pretty much what it does we're going to run this and as you can see we have a new picture here I'm going to put them in the same order that we had no don't make it screen size so this is the original picture well this is the original picture as you can see this is it is a fake picture by the way you can see that in a moment but as you can see the blue channel becomes very blue the rocks yeah drop arrow here it's green which we saw in a real picture is not the case so this is an edited picture but we will see that here because as you can see the red channel although it's it's less bright it is only less bright where it's blue so everywhere where it's blue so that's the background basically there you can see that the blue channel actually well is too too bright the green Channel is okay and the red channel is well too dark but all of the fishes are fine which means it's a fake because these fishes in the backgrounds can normally not even be seen without editing so if we edit it with the same thing you can see that I made the red channel a lot better it's almost equal to the green Channel now and yeah the the overall picture just but it becomes a little more a little bit less of that yeah annoying very very blue the rocks also become a little more rock color so a little less green but as I said this is a fake picture so I can't really make it better because there is no matter because it's a fake picture someone already did this so took the backgrounds which is probably a real photo and then put all these fishes in it and the fishes yeah they didn't do anything to it so basically there's not a lot I can make better then three is I think the best one to demo this is the best one to demonstrate the effect as you can see it's someone sitting in the water yeah let me just arrange these pictures a little bit so we are going from a real picture this time so this one is an actual picture you can see it here in well full size you can see that the blue is kind of tinting the body so the body is not actually body color the water is completely blue greenish and the scent even though it's sand color here does not stay sand colored you can see the beach for well all the way up to here or something but especially the colors that well did their skin color for example we want to fix that so we're gonna if we run the algorithm we get to this Oh first of all first of all let's you let's show this and you can see that ya descend kind of descent color stops here so the sand color itself stops here but then the sand stops somewhere here and the rest of the water just becomes well bluish and then we have a green which is completely saturated and blue which is actually not too saturated so you might want to switch it up a little bit but if we apply the same algorithm and we make the Reds a little brighter then it was then we get much better skin tone as you can see this is actual skin tone you can still see it under water you can see the sand color up to here where it mixes with the water color which is discolor for our eye so if you were to be in this this this water and you would sit where the photo camera is actually sitting this is what you would see because our eyes are way better than this crappy camera is so the the purple of course becomes purple the white becomes white yeah and the skin colour as I said becomes skin colour so it is just a big big result going from this to this or about this and well that's all because you just separate the three channels and then just learn that well the red is completely under lit so we need to brighten up the red add more red in there and then it becomes real again but as you might have noticed not every photo is exactly the same so on there's that so the last one done just as a demo this is from some Russian site it's apparently an underwater cave and we will see and well obviously this is the picture that this one is the picture that they posted online it is completely blue there is no way this is what it looks like I mean in reality this does not look blue otherwise she would bring a different colour lights because well there is no way you want to go into a blue environment like that if we look at this split you can see the red is almost just black the red channel is almost none available it's only available where he actually shines with his with his length and only then it is because the light spot is actually all the way here but only where it's super bright like that is where – red light dressage is dark completely dark so if we add a depth and we get it to be dis which is way better of course and we get this as a final picture and I will show that to you on full screen and it becomes much more of a well a real core I mean obviously it's not purple there either you can actually make it gray very easily but we don't want it great we want it to have some kind of color and is apparently well seeing from the other pictures especially picture number three this is much closer to what the picture should look like if you were really swimming there so anyway just a demonstration of what you can do with with photo editing with four and if loops because that's all I'm using here in this case even only a for loop but in the previous examples also if loops and you can do quite a lot with them and well this is something you could try out at home as I said in Reed's important.you and eight transformation back and forth so if you want to calculate with values they need to be doubles if you want to use em show they need to be you and eight so you can just do yeah to make it easier on yourself you can make a pixel start off as a you and eight but you can make after your calculation this statement pixels new which is so far a double is you and 8 pixels new and that will transfer everything to you into eight and then you don't have to do this anymore I'm going to keep it there just because well I like it like that because the this actually would transform the variable this only changes the variable inside of this statement so even though if I don't have this then after this entire thing it will still be a double and I personally like that I like to do my calculations where double and keep them as a double and then every time I have to plot them I just add you into eight so yeah as I said the only thing you need to learn here is in read to do photo editing and well this lengths statement is pretty useful also size we use that here it's kind of useful we'll give you all well all of the things that you can get out of this matrix so length width and or length height and amount of colors so it will give you three values basically and if you use zeros like this so zeros or once makes a matrix of zeros or ones with the size that you say so in this case the size is the same size as pixels was and that's why I use it like that so anyway hope you learned something today and I will see you next time

21 - Blender Video Editing(Face Blurring / Masking with UV-Image Editor / Auto-Keyframe)

21 – Blender Video Editing(Face Blurring / Masking with UV-Image Editor / Auto-Keyframe)



hello youtube mikeycal here and this video number 21 in my series on utilizing blender as a video editor now in the previous video I showed you guys how you can do the Ken Burns effect and in today's video I'm going to be introducing you guys to the uv/image editor and we're going to be doing masking and we're going to be doing masking specifically to do a face blur so let's get right to that so the first thing that we want to do is I actually imported a small segment of the movie Big Buck Bunny and what we're going to do is we want to blur out this bird's face and let's play it back we can see how this bird moves so I want the the mask of a blur effect to move with the bird so how are we going to do that well we can do that with our UV image editor so let's stop this and we're going to go back to the first frame and we're going to do is when I go up to this little drop down up here and we're going to switch this to a UV image editor there we go we want to do first is we want to switch the UV image editor to the mask mode and we can do that by selecting masks from this drop down here okay now it gives us an option right here of new and that means create a new mask so we're going to click this new button and it by default names the new mask mask but we're going to make a blur mask so I'm just going to call it blur and enter there you go and now we can actually start creating our mask now you'll notice this little thing right here you can ignore that in fact we can actually just click our left mouse button move to the side what do we need first before we create a mask well we need a reference first of all I mean I need to see where I'm going to place the mask so what we're going to do is we're going to go to open and we're going to select the same video that we have in our preview window there we go and I'll scroll down a little bit to get it to the same size or around the same size okay so this side the in the UV image editor we're using this for a reference so that we can actually draw our mask over this and go for by frame and see how the mask needs to change and so what we need to do is let's first go down to the View menu and select properties and they'll open up some properties and we need to click let's pull this out a little bit we need to click the match movie length button and I'll check Auto refresh and that should be enough for us right now let's actually go back down to view we're going to close that and now whenever you click and drag it will actually play the video in both the preview window and in the uv/image editor now it will not play in the uv/image editor if you click the play button this is just how it is so let's go back to the first frame by clicking the little navigation button down here to the first frame now what I'm going to do we want to actually start drawing our a mask and the way that you do that is you hold your control button down on your keyboard and while you're holding the control button down you left-click to place a marker right there so we have our first little marker and we want to draw a circle so we just have to have a group of markers so we're going to find another spot we want to place a marker and I'm still holding down the control button and hitting my left button we're going to draw this around the face I'm just clicking my left mouse button with my control button down and you'll see that there's a gap between here and we can zoom in with our mouse wheel you can leave this gap here it's actually nice to leave the gap there because you can actually see where the beginning and ending is by default blender will automatically connect the beginning and ending markers but if you really wanted to actually see them connecting go down to the mask menu and you can click toggle cyclic and I'll actually close it but I'd recommend not to do that because it's nice to know where the beginning and ending are so let's undo that now all we need to do is we actually have a mask layer now we just need to go frame-by-frame and make some changes to it and this is where we're going to need to use this feature down here called auto key frame insertion so if you click this on now what will happen is blender will automatically monitor if there's a change in shape or position of our mask and it will actually insert keyframes automatically and this is not the same kind of keyframe inserting that we have when we go to our dope sheet or graph editor because we can't actually view the keyframe insertions that are generated by the auto-keyframe system in our graph or our dope sheet is completely handled 100% by blender internally and so what we're going to do is we have our general shape and we're on frame 1 and we're going to go down to our arrow keys on our keyboard and if you push the actual right area on your keyboard it will actually take you single frame at a time and you can see over here it's showing each frame as we go forward and it's also showing the green line moving now you can see the frames are changing and as they change we need to move the mask layer so we can actually select the mask layer by toggling the a button hit the a button once in it it D selects hit it twice and it selects all you can keep toggling it as much as you want this is how you select everything and unselect everything now we can hit our G button and we can drag it down and just place it somewhere around them where it's covering there we go and let's continue moving forward wit by hitting our arrow keys and hit our G button and move it down arrow key to the right and it doesn't have to be perfect we're doing a blur effect it doesn't have to be a perfect coverage just enough to conceal the identity you you can see this actually works pretty quickly I mean you can fly through this I mean once you have you know that you're just selecting all G and moving and going forward frame by frame yeah kind of fly through it and I'm going to use my scroll wheel to scroll down to zoom out and we're going to go forward and I'm going to G and move it out of the frame and now let's go back to the beginning okay and let's zoom in there mouse wheel and let's watch as I drag over this how this moves cool right now it's not perfect and you can actually go to each frame and you can actually select an individual marker and you could hit your G button you can actually adjust it and it will fix it for that frame and we'll make the other frames transition from that position so now you'll see when I move forward it's actually moving the shape as well as the whole entire mask object okay so I've shown you guys how you can make a mask but we want this to be in the video and this right but this background here is really just a reference we want to get that we want to get this mask over here onto onto the preview window so the way we're going to do that is we first right click on our video strip right down here let's go back to the first frame and let's add a adjustment layer okay now when you add an adjustment layer if you go over to the properties for that adjustment layer right click on the adjustment layer and go to the properties you can see it has a length of 25 this is another way that you guys can actually make the length of the adjustment layer match the video layer you can just right click on the video strip and you can see it has a length of 133 so all we got to do is right click on our adjustment layer go over to length 1 3 3 enter and look at that actually match the length perfect now we're going to go to our adjustment layer by right clicking on it and we're going to scroll down and we're going to go to add strip modifier and we're going to select masks now when we scroll down where we have two buttons one is strip and one is mask we're going to select mask and you see a little icon right here looks a little mask if you click on that if your left mouse button it will present all of the masks that we have available to blender and we only made one it's called blur so let's click on that now you can see let's actually scroll over this and we'll see it's selecting a specific area that we're that's going to be viewable see how it looks in the actual preview window now it's not perfect but this will do the job for just doing a face blur let's go back to the first frame now we want to blur this and we also want to be able to see the rest of the background so what we need to do is we need to right-click on our adjustment layer we're going to go to the add menu and effect strip and we're going to select Gaussian blur there we go now just like we do with the video strips and with the image strips right click on the adjustment layer and we're going to hit the H button which is the hide button you can also go down to strip menu and you could select mute strips it's the same thing and now let's select our Gaussian blur layer with our right mouse button and let's scroll up okay and what we're going to do is we're going to set the blend setting of our Gaussian blur to alpha over and now you can see the the actual total video but it's not blurred why because we haven't set our blur setting so make sure that you have the Gaussian blur strip selected scroll down and right down here in the effects strips section we have size X and size Y and all you have to do is give of x and a y value and it will blur it so I'm going to blur it with a 20 X and hit enter and you can see how it blurred it and will do 20 X or 20 Y enter and this will slow everything down when you actually preview over it but it will now blur the face so actually I'm going to just skip ahead some frames so you can see that it actually is moving and blurring the face it's really slow because it has to render the frame so I just click that and that took seconds for that to actually show me that preview but you can see it's actually moving around and it's blurring it so all we need to do now is we need to go to our property our our properties window and let's go down here and click on properties and we need to set our render settings as we usually do and hit the animation button and when it's finished we'll have a perfect video of this bird with its face blurred out I think that should do it for today I'll see you guys in the next video

How to thread film in Panavision Panaflex Lightweight II 35mm film camera

How to thread film in Panavision Panaflex Lightweight II 35mm film camera



right there so basically we're gonna split those two rollers those two okay so then we want to um these are your registration pins right here reg pins these are your pulldown claws they couldn't get it to turn so remove those they pushing it in trimmed it right so we're getting those off we're getting those back I swear I just did that didn't and then we're gonna get the dredge pins back so that will clear that will clear the film path okay so then we could this is how you pull the gate those have to be back and the claws have to be back okay case you get a film jam or something you're gonna want to pull the gate or you get something in there this is the bottom lock and this is the top lock no but I go out in like a tech on all the big jobs okay so yeah we're gonna come around there like just like the diagram through there and then under that loop so we're gonna go under that one and then over that one over that one this one right here okay so you start from the bottom one first that's about the table doesn't matter um it doesn't matter okay like I said these have to be back are you not gonna be able to get the film out okay so once I get in there loop okay so once once I'm in there like like this now we have to set our loop okay so you have this pin right here is that pin that's your index pin okay so you're gonna get with your finger you're gonna find a perf and just pop the the perf in that index pin okay and then you might want to make sure the bottoms in you want to make sure the bottoms not like that when you do it okay you always wanna make sure the bottoms in okay so as soon as you find a perf with your finger get it in there and then boom then just pop that in there once you pop that in there now you can set your loop okay so we're gonna come a little bit off that pin and then lock the sprocket down okay so I'm gonna put the claw at the top and I'm gonna measure the top claw at the top and I'm hitting the pin C so I'm gonna take I'm gonna come a little bit off the pin just enough where I'm not hitting it okay so now we're gonna check the bottom okay you can only measure the bottom when the stroke gets at the bottom and you can only measure the top when the stroke is at the top that's important but you won't get a good reading okay so the rule is you want the biggest loop possible without hitting the floor and without hitting that pin okay so we could go like a little bit more on the bottom there so I'm gonna open this up and I'm just gonna go one purse and then lock it back down okay so now I'm gonna itch it top I'm just missing the pin which is what we want bottom we're just missing the bottom and then make sure these are both locked down down the area you also have a one button it just proves that afraid right however it does yeah our newer cameras have an inch in body inside the body this is serving all one and then this is your pitch knob this will pick you tonight nice smooth sound which is right there dependent a hunch film you're running through it yeah and there's to the business as well and their silhouette

Longtime KMBC Photojournalist Retires

Longtime KMBC Photojournalist Retires



LARA: WE USUALLY GO OVER STORIES
THAT STOOD OUT TO ALL OF US. TODAY, WE WANT TO SAY THANK YOU
TO A MEMBER OF THE KMBC 9 NEWS
FAMILY. KELLY: THIS WAS OUR LAST DAY
WORKING WITH WIN CASPER, I HAVE
WORKED WITH HIM FOR ALMOST 30 OF
THOSE YEARS. I SPENT A LOT OF TIME WITH HIM. WE ALL SAY HE IS A MAN OF FEW
WORDS, BUT HE GETS THE JOB DONE. EVERYONE SAYS HE IS JUST A
GENTLEMAN. BRYAN: I WAS A YOUNG
METEOROLOGIST, HE WAS ONE OF THE
FIRST PHOTOGRAPHERS, ONE OF MY
FIRST ASSIGNMENT WAS TALKING
ABOUT HEELYS,, AND WE HAD TO DO
INTERVIEWS. KELLY: I GOT TO WORK WITH HIM, I
WAS SO HONORED. HE AND I TRAVELED TO SEE OPRAH. WE USED TO GET TO DO SOME OF
THAT TRAVELING. IT WAS A TOUGH DAY FOR ALL OF
US. LARA: HAPPY RETIREMENT, WE WILL
MISS YOU SO MUCH

5 Real Fairies Caught on Camera

5 Real Fairies Caught on Camera



mankind proudly says it is at the top of the food chain studies the cosmos and drains of the colonization of other planets but why look at the sky when under your feet can be amazing and incredible creatures inhabiting it none of these people could have assumed that their ordinary home video cameras would capture such incredible footage this father and his three children walked around the garden at one point one of the children was alerted by a strange sound coming from the apple tree as the child got closer to the source of the sound the wings of a creature fall onto the camera but after a moment the creature takes off and we see a small fragile body similar to a man Oh this video was shot late at night on the security camera according to the guy who shot this video when viewing it he discovered something strange for the answer he turned to YouTube calling his video real fairies I caught on my security camera the audience explained to him that he was mistaken and captured a mosque but the guy remained true to his convictions as his theory was supported by a lot of people you can tell us your take on this creature in the comments below the video this video was taken by a young couple right in their apartment a strange small luminous creature that resembles a fairy this creature moved very quickly in chaotically right in front of the camera as of posing or even trying to say something upon further examination the silhouette of a tiny little man with wings is clearly visible what is it moth montage or real shots of a previously unknown creature maybe it is the representative of an entire micro civilization hiding somewhere near us what do you think in Thailand there is a place where two mummified bodies are exposed in a glass box for people to view they are called flower fairies do you think they are real in this video we see a person enter the room but then he returns as if someone barely audible voice made him return and most likely not in vain since he became the rare witness of something really inexplicable and improbable directly near him circled the 2 most real looking fairies and do you believe in fairies guys we are waiting for your comments thanks for watching subscribe for more

Lecture 2 Image Digitization I

Lecture 2 Image Digitization I



you you welcome to the video lecture series on digital image processing in our earlier class that is during the introductory lecture on this digital image processing we have seen the various applications of digital image processing technique we have also talked about the history of image processing techniques and we have seen that though the digital image processing techniques are very popular and used in wide application areas these days but the digital image processing techniques is quite old in fact we have seen that as early as in 1920s the digital image processing techniques were being used to transmit the newspaper images from one place to another after talking about the history we have also seen the various steps that are involved in image processing techniques and while talking about the various steps we have seen that the first step that has to be done before any processing can be done on the images is digitization of images so in today's lecture and the next lecture we will talk about the digitization process through which an image taken from a camera can be digitized and that digital image can be finally processed by a digital computer so in today's lecture we will talk about digital image digitization techniques now during this course we will talk about why image digitization is necessary we will also talk about what is meant by signal bandwidth we will talk about how to select the sampling frequency of a given signal and we will also see the image deconstruction process from the sampled values so in today's lecture we will try to find out the answers to three basic questions the first question is why do we need digitisation then we will try to find out the answer to what is meant by digitization and thirdly we'll go to how to digitize an image so let us talk about this one after another firstly let us see that why image digitization is necessary you find that in this slide we have shown an image this is the image of a girl and as we have just indicated in our introductory lecture that an image can be viewed as a two dimensional function given in the form of f X Y now this image has certain length and certain height the image that has been shown here has a length of L this L will be in units of distance or units of length similarly the image has a height of H which is also in units of distance or units of length any point in this two dimensional space will be identify the image coordinates x and y now find that conventionally we have said that x axis is taken as vertically downwards and y axis is taken as horizontal so every coordinate in this two dimensional space will have a limit like this that value of x will vary from 0 to H and value of L will value of y will vary from 0 to L now if I consider any point XY in this image the point XY or the intensity or the color value at point XY which can be represented as a function of x and y where XY identifies a point in the image space that will be actually a multiplication of two terms one is our XY and other one is AI XY we have said during our introductory lecture that this our XY represents the reflectance of the surface point of which this particular image point corresponds to and I XY represents the intensity of the light that is falling on the object surface theoretically this our XY can vary from 0 to 1 and I X Y can vary from 0 to infinity so a point F X Y in the image can have a value anything between 0 to infinity but practically the intensity at a particular point or the color at a particular point given by X Y that varies from certain minimum which is given by I mean and certain maximum I max so the intensity at this point X Y that is represented by X Y will vary from minimum intensity value to certain maximum intensity value now find the second figure in this particular slide it's a shows that if I take a horizontal line on this image space and if I plot the intensity values along that line the intensity profile will be something like this it again shows that this is the minimum intensity value along that line and this is the maximum intensity value along the line so the intensity at any point in the image or intensity along a line whether it is horizontal or vertical can assume any value between the maximum and minimum now here lies the problem when we can consider a continuous image which can assume any value and intensity can assume any value between certain minimum and certain maximum and the coordinate points x and y they can also some value between X can vary from 0 to H y can vary from 0 to L now from the theory of real numbers you know that given any to point that is between any two points there are infinite number of points so again when I come to this image as X varies from 0 to H there can be infinite possible values of X between 0 and H similarly there can be infinite values of Y between 0 and L so effectively that means that if I want to represent this image in a computer then this image has to be represented by infinite number of points and secondly when I consider the intensity value at a particular point we have seen that the intensity value F X Y it varies between certain minimum I mean and certain maximum IMAX again if I take these two I mean and I max to be minimum and maximum intensity values possible but here again the problem is the intensity values the number of intensity values that can be between minimum and maximum is again infinite in number so which again means that if I want to represent an intensity value in a digital computer then I have to have infinite number of bits to represent an intensity value and obviously such a representation is not possible in any digital computer so naturally we have to find out and weigh out that is our requirement is we have to represent this image in a digital computer in a digital form so what is the way out in our introductory lecture if you remember that we have said that instead of considering every possible point in the image space we will take some discrete set of points and those discrete set of points are decided by grid so if we have an uniform rectangular grid then at each of the grid locations we can take a particular point and we will consider the intensity at that particular point so this is a process which is known as sampling so what is desire desired is we want that an image should be represented in the form of a finite two dimensional matrix like this so this is an matrix representation of an image and this matrix has got finite number of elements so if you look at this matrix you find that this matrix has got m number of rows varying from 0 to M minus 1 and the matrix has got n number of columns varying from 0 to n minus 1 typically for image processing applications we have mentioned that the dimension is usually taken either as 256 by 256 or 512 by 512 or 1k by 1k and so on but still whatever be the size the matrix is still finite we have finite number of rows and we have finite number of columns so after sampling what we get is an image in the form of a matrix like this now the second requirement is if I do not do any other processing on these matrix elements now what this matrix element represent every matrix element represents an intensity value in the corresponding image location and we have said that this intensity values or the number of instant intensity values can can again be infinite between certain minimum and maximum which is again not possible to be represented in a detail computer so here what we want is each of the matrix elements should also assume one of finite discrete values so when I do both of these that is first operation is sampling to represent the image in the form of a finite two dimensional matrix and each of the matrix elements again has to be digitized so that the intensity value at a particular element or a particular element in the Tech's can assume only values from a finite set of discrete values these two together completes the image digitization process now here is an example you find that we have shown an image on the left hand side and if I take a small rectangle in this image and try to find out what are the values in that small rectangle you find that these values are in the form of a finite matrix and every element in this rectangle in this small rectangle or in this small matrix assumes an integer value so an image when it is digitized will be represented in the form of a matrix like this so typically what we have said till now it indicates that by digitization what we mean is an image representation by a 2d two dimensional finite matrix the process known as sampling and the second operation is each matrix element must be represented by one of the finite set of discrete values and this is an operation which is called quantization in today's lecture we will mainly concentrate on the sampling and quantization we will talk about later now let us see that how what should be the different blocks in a image processing system firstly we have seen that computer processing of images require that images the available in digital form and so we have to digitize the image and the digitization process is a two-step process the first step is sampling and the second step is quantization then finally when we digitize an image processed by computer then obviously our final M will be that we want to see that what is the processed output so we have to display the image on a display device now when the image is being processed the image in the digital form but when we want to have the display we must have that display in the form of analog so whatever process we have done during digitization during visualization or during display we must do the reverse process so that so for displaying the images it is for it has to be first converted into the analog signal which is then displayed on a normal display so if we just look in the form of a block diagram it appears something like this that while digitization first we have to sample the image by a unit which is known as sampler then every sample values we have to digitize the process known as quantization and after quantization we get a digital image which is processed by the digital computer and when we want to see the processed image that is how does the image look like after the processing is complete then for that operation it is the digital computer which gives the digital output this digital output goes to D to a converter and finally the digital to analog converter output is fed to the display and on the display we can see that how the processed image looks like now let us come to the first step of the digitization process that is sampling to understand sampling before going to the two-dimensional image let us take an example from one dimension that is let us assume that we have an one dimensional signal XT which is a function of T here we assume this T to be time and you know that whenever some signal is represented as a function of time whatever is the frequency content of the signal that is represented in the form of hearts and this hurts means it is cycles per unit time so here again when you look at this particular signal XT you find that this is an analog signal that is T can assume any value T is not discretized similarly the functional value XT can also assume any value between certain maximum and minimum so obviously this is an analogue signal and we have seen that an analog signal cannot be represented in a computer so what is the first step that we have to do as we said that for digitization process the first operation that you have to do is the sampling operation so for sampling what we do is instead of taking considering the signal values at every possible value of T what we do is we consider the signal values at certain discrete values of T so here in this figure it is shown that we assume the value of the signal XT at T equal to 0 we also consider the value of the signal XT at T equal to 2 delta T s assume the value of signal XT at T equal to Delta 2t s at T equal to Delta 3 TS and so on so instead of considering the signal values at every possible instant we are considering the signal values at some discrete instants of time so this is a process known as sampling and here when we are considering the signal values at an interval of delta T s so we can find out what is the sampling frequency so delta T s is the sampling interval and corresponding sampling frequency if I represent it by F s it becomes 1 upon Delta TS now when you sample the signal like this you find that there are many informations which are being missed so for example here we have a local minimum here we have a local maximum here again we have a local minimum local maximum here again we have a local maximum and when we sample at an interval of Delta TS these are the informations which cannot be captured by these samples so what is the alternative the alternative is let us increase the sampling frequency or letters decrease the sampling interval so if I do that you find that these bold lines bold golden lines they represent the earlier samples that we had like this whereas this dotted green lines they represent the new samples that we want to take and when we take this new samples what we do is we reduce the sampling interval by half that is our earlier sampling interval was Delta TS now I make the new sampling interval which I represent as delta T s dash which is equal to Delta TS by 2 and obviously in this case the sampling frequency which is F s dash equal to 1 upon delta T s – now it becomes twice of F s that is earlier we had the sampling frequency of F s now we have the sampling frequency of Delta F s at Y surface and when we increase the sampling frequency you find that with the earlier samples represented by these solid lines you find that this particular information that is tip in between these two solid lines were missed now when I introduce a new sample in between then some information of this minimum or of this local maximum can be retained similarly here some information of this local minimum can also be retained so obviously it says that when I increase the sampling frequency or I reduce the sampling interval then the information that I can maintain in the sampled signal will be more than when the sampling frequency is less now the question comes whether there is a theoretical background by which we can decide that what is the family sampling frequency proper sampling frequency for certain signals that we can decide welcome to that a bit later now let us see that what does this sampling actually mean we have seen that we have a continuous signal XT and for digitization instead of considering the signal values at every possible value of T we have considered the signal values at some discrete instants of time T okay now this particular sampling process can be represented mathematically in the form that if I have if I consider that I have a sampling function and this sampling function is a one-dimensional array of Dirac Delta functions which are situated at a regular spacing of delta T so this sequence of Dirac Delta functions can be represented in this form so you find that each of these are sequence of Dirac Delta functions and the spacing between two Delta functions is delta T in short this kind of function is represented by comb function the comb function T at an interval of delta T and mathematically this comb function can be represented as Delta t minus M into delta T where m varies from minus infinity to infinity now this is the Dirac Delta function the Dirac Delta function says that if I have a drag delta function delta T then the functional value will be 1 whenever T equal to 0 and the functional value will be 0 for all other values of T in this case when I have Delta t minus M of delta T then this functional value will be 1 only when this quantity that is t minus m delta t within the parentheses becomes equal to zero that that means this functional value will assume a value one whenever T is equal to M times delta T for different values of M varying from minus infinity to infinity so effectively this mathematical expression gives rise to a series of Dirac Delta functions in this form where at an interval of delta T I get a value of 1 for all other values of T I get values of 0 now this sampling as you find that we have represented the same figure here we had this continuous signal XT original signal after sampling we get a number of samples like this now here these samples can now be represented by multiplication of XT with the series of Dirac Delta functions that we have seen that is comp of T delta T so if I multiply this whenever this comb function gives me a value 1 only the corresponding value of T will be retained in the product and whenever this comb function gives you a value 0 the corresponding points the corresponding values of XT will be set to 0 so effectively this particular sampling went from this analogue signal this continuous signal we have gone to this discrete signal this discretization process can be represented mathematically as X s T is equal to XT into comp of T delta T and if I expand this comb function and consider only the values of T where this calm function has a value 1 then this mathematical expression is translated to X of M delta T into delta t minus m delta t where m varies from minus infinity to infinity right so after sampling what you have got is from a continuous signal we have got the sampled signal represented by X s t for the sample values exist at discrete instants of time amping what we'll get is a sequence of samples as shown in this figure where X s T has got the signal values at discrete time instants and during the other time intervals the value of the signal is set to zero now the sampling will be proper if we are able to reconstruct the original continuous signal XT from this sample values and we will find out that while sampling we have to maintain certain conditions so that the reconstruction of the analog signal XT is possible now let us look at some mathematical background which will help us to find out the conditions which we have to impose for this kind of reconstruction so here you find that if we have a continuous signal in time which is represented by XT then we know that the frequency components of this signal XT can be obtained by taking the Fourier transform of this XT so if I take the Fourier transform of XT which is represented by f of X T which is also represented in the form of capital X of Omega where Omega is the frequency component and mathematically this will be represented as XT e to the power minus J Omega T DT and we have two intake the integration of this from minus infinity to infinity so this mathematical expression gives us the frequency components which is obtained by the Fourier transform of the signal XT now this is possible if the signal XT is a periodic but when the signal XT is periodic in that case the instead of taking the Fourier transform we have to go for Fourier series expansion and the Fourier series expansion of a periodic signal say VT where we assume that VT is a p-adic signal is given by this expression we're Omega zero is the fundamental frequency of this signal VT and we have to take the summation from n equal to minus infinity to infinity now in this case the C n is known as Fourier coefficients of NH Fourier coefficient and the value of C n is obtained as C n is equal to 1 upon T naught VT e to the power minus J in Omega naught T DT and this integration has to be taken over a period that is T naught now in our case when we have this VT in the form of series of Dirac Delta functions in that case we know that value of VT will be equal to 1 when T equal to 0 and value of VT is equal to 0 for any other value of T within a single period so in our case T naught that is the period of this periodic signal is equal to delta T s because every Delta function appears at an interval of delta T s and we have V T is equal to 1 for T is equal to 0 and VT is equal to 0 otherwise okay now if I impose this condition to calculate the value of C n in that case you will find that the value of this integral will exist only at t equal to zero and it will be zero for any other value of T so by this we find that C n now becomes equal to 1 upon delta T s and this 1 upon delta T s is nothing but the sampling frequency we put at say Omega s so this is the frequency of the sampling signal now with this value of C n now the periodic signal VT can be represented as 1 upon delta t s summation of e to the power J n Omega naught T for n equal to minus infinity to infinity so what does it mean this means that if I take the Fourier series expansion of our periodic signal which is in our case Dirac Delta function this will have frequency components various frequency components where the fundamental component of the frequency is Omega naught and it will have other frequency components of twice Omega naught 3 is omega naught fourth times Omega naught and so on so if I plot those frequencies or frequency spectrum we find that we will have the fundamental frequency Omega naught or in this case this Omega naught is nothing but same as the sampling frequency that is Omega S will also have a frequency component of twice Omega s will also have a frequency component of twice Omega s and this continues like this so you find that the calm function as the sampling function that we have taken the frequency the series expansion of that is again a comm function now this is about the continuous domain when we go to discrete domain in that case for a discrete time signal say X n where n is the NH sample of the signal X the Fourier transform of this is given by XK is equal to sum of X n e to the power minus J 2 pi by n into n K where value of n values from 0 to n minus 1 where this capital n indicates that the number of samples that we have for which we are taking the Fourier transform and given this Fourier transform we can find out the original sampled signal by the inverse Fourier transformation which is opted as X n is equal to sum of XK e to the power J 2 pi by n in K and this time the summation has to be taken over k for k equal to 0 to n minus 1 so find that we get a Fourier transform pair in one case from the discrete-time signal we get the frequency components discrete frequency components by the forward Fourier transform and in the second case from the frequency components we get the discrete-time signal by the inverse Fourier transform and these two equations taken together forms a Fourier transform pair now let us go to another concept a concept called convolution you find that we have represented our sampled signal as X s T is equal to X T multiplied by calm function T delta T okay so what we are doing is we are taking two signals in time domain and we are multiplying these two signals now what will happen if we take the Fourier transform of these two signals or let us put it like this I have two signals XT and I have another signal say H T both of these signals are in the time domain we define an operation called convolution which is defined as x HT convolution with XT this convolution operation is represented as H of tau X of t minus tau D tau integration is taken over tau from minus infinity to infinity now what does it mean this means that whenever we want to take the convolution of two signals HT and X T then firstly what we are doing is we are time inverting the signal XT so instead of taking X tau we are taking X of minus tau so if I have two signals of this form say H T is represented like this and we have a signal say XT which is represented like this then what you have to do is as our expression says that the convolution of h t xt is nothing but h tau x t minus tau D tau integration over minus infinity to infinity and HT is like this and XT is like this this is the HT and this is XT then what you have to do is for convolution purpose we are taking H of tau and X of minus tau so if I take X of minus T this one function will be like this so this is X of minus T and for this integration we have to take H of tau for a value of tau and X of minus tau that has to be translated by this value T and then the corresponding values of H and X have to be multiplied and then you have to take the integration from minus infinity to infinity so if I take an instance like this okay so at this point I want to find out what is the convolution value then I have to multiply the corresponding values of H with these values of X each and every time instance I have to do the multiplication then I have to integrate from minus infinity to infinity I will come to application of this a bit later now let us see that if we have a convoluted signal so we have h t which is convoluted with xt and if i want to take the Fourier transform of this signal then what we will get the Fourier transform of this will be represented as H tau X of t minus tau D tau so this is the convolution integration over tau from minus infinity to infinity and then for the Fourier transform I have to do e to the power minus J Omega T DT and then again I have to take the integral from minus infinity to infinity so this is the Fourier transform of the convolution of close to signals HT and XT now if you do this integration you find that the same integration can be written in this form I can take out H tau out of the inner integral the inner integral I can represent as X of t minus tau e to the power minus J Omega t minus tau DT so I can put this as the inner integral then I have to multiply this whole term by e to the power minus J Omega tau D tau and then this integration will be from tau equal to minus infinity to infinity now find that what does this inner integral mean from the definition of Fourier transform this inner integral is nothing but the Fourier transform of X T so this expression is equivalent to H of tau X of Omega e to the power minus J Omega tau D tau where this integration will be taken over tau from minus infinity to infinity now what I can do is because this X Omega is independent of tau so I can take out this X Omega from this integral so my expression will now be X Omega then within the integral I have H of tau e to the power minus J Omega tau D tau where the integration is taken over tau from minus infinity to infinity again you find that from the definition of Fourier transformation this is nothing but the Fourier transformation of the time signal HT so effectively this expression comes out to be X of Omega into H of Omega where X of Omega is the Fourier transform of the signal XT and H of Omega is the Fourier transform of the signal HT so effectively this means that if I can take the convolution of two signals XT and HT in time domain this is equivalent to multiplication of that the two signals in the frequency domain so convolution of the two signals XT and HT in the time domain is equivalent to multiplication of the same signals in the frequency domain the reverse is also true that is if we take the convolution of X Omega and H Omega in the frequency domain this will be equivalent to multiplication of XT and H T in the time domain so the both these relations are true and we'll apply this relations to find out that how the signal can be reconstructed from its sample values so now let us come back to our original signal so here we have seen that we have been given this sample values and from the sample values or M is 2 start this continuous signal XT and we have seen that this sampling is actually equivalent to multiplication of two signals in the time domain one signal is XT the other signal is comb function comp of T delta T so these relations as we have said that these are true that if I multiply two signals XT and YT in time domain that is equivalent to convolution of the two signals X Omega and Y Omega in the frequency domain similarly if I take the convolution of two signals in time domain that is equivalent to multiplication of the same signals in frequency domain so for sampling when you have said that you have got X s of T that is the sampled values of the signal XT which is nothing but multiplication of XT with the series of Dirac Delta functions represented by comm of T delta T so that will be equivalent to in frequency domain I can find out X s of Omega which is equivalent to the frequency domain representation X Omega of the signal XT convoluted with the frequency domain representation of the comb function come t delta T and we have seen that this comb function the Fourier transform or the Fourier series expansion of this compunction is again a comp function so what we have is we have a signal X Omega we have another come function in the frequency domain and we have to take the convolution of these two now let us see this convolution in details what does this convolution actually mean here we have taken two signals H N and X n both of them for this purpose or in the sample domain so H n is represented by this and X n is represented by this you find that this H n is actually nothing but a comm function where the delta t s in this case we have value of h n is equal to 1 at n equal to 0 we have value of HN equal to 1 at n equal to minus 1 we have value of HN equal to 1 at n equal to minus 9 we have value of HN equal to 1 at n equal to plus 9 and this thing repeats so this is nothing but representation of a comp function and if I assume that my X n is of this form that is at n equal to 0 value of x n is equal to 7x minus 1 that is that n equal to minus 1 it is 5 n minus 1 minus 2 it is equal to 2 similarly on this side for n equal to 1 X 1 equal to 9 and X 2 equal to 3 and the convolution expression that we have said in the continuous domain in discrete data domain the convolution expression is translated to this form that is y n equal to H M into X n minus M where m varies from minus infinity to infinity so let us see that how this convolution actually takes place so if I really understand this particular expression that H M X of n minus m sum of this from n equal to minus infinity to infinity we said that this actually means that we have to take the time in version of the signal xn so if I take the time in version the signal will be something like this 3 9 7 5 and 2 and when I take the convolution that is I want to find out the various values of Y n that particular expression can be computed in this form so if I want to take the value of y minus 11 so what I have to do is I have to give a translation of minus 11 to this particular signal X of minus M so it comes here then I have to take the summation of this product from m equal to minus infinity to infinity so here what does it do you find that I do point-by-point multiplication of these signals so here zero multiplied with three plus it will be zero multiplied with nine plus 0 multiplied with 7 plus 0 multiplied with 5 plus 1 multiplied with 2 so the value that I get is 2 and this 2 comes at this location Y of minus 11 now for getting the value of y of minus 10 again I do the same computation and here you find that this one gets multiplied with 5 and all other values gets multiplied with 0 and when you take the summation of all of them I get 5 here then I get value at minus 10 I get 7 here following the same operation sorry this is at minus 9 I get at minus 8 I get at minus 7 I get at minus 6 at minus 6 you find that the value is 0 if I continue like this here again at n equal to minus 2 I get value equal to 2 at n equal to minus 1 I get value equal to 5 at n equal to 0 I get value of 7 at n equal to plus 1 I get value of 9 at n equal to plus 2 I get value of 3 at n equal to plus 3 again I get the value of 0 so if I continue like this you find that after completion of this convolution process this H n convoluted with xn gives me this kind of pattern and here you notice one thing that when I have convoluted this xn with this H n the convolution output Y n this is you just notice this that it is a repetition of the pattern of xn and it is repeated at those locations where the value of H n was equal to 1 so by this convolution what I get is I get repetition of the pattern xn at the locations of Delta functions in the function hm so by applying this when I convolute two signals XT and the Fourier transform of this comb function that is comm Omega in the frequency domain what I get is something like this when XT is band limited that means the maximum frequency component in the signal XT is the Omega naught then the frequency spectrum of the signal XT which is represented by X Omega will be like this now when I convolve this with this comb function comp of Omega then as we have done in the previous example what I get is at those locations where the comb function had a value 1 I will get just a replica of the frequency spectrum X Omega so this X Omega gets replicated at all these locations so what we find here you find that the same frequency spectrum X Omega when it gets translated like this when XT is actually sampled that means the frequency spectrum of X s or X s Omega is like this now this helps us in the construction of the original signal XT so here what I do is you find that around Omega equal to zero I get a copy of the original frequency spectrum so what I can do is if I have a low-pass filter whose cutoff frequency is just beyond Omega naught and this frequency signal this spectrum the signal with this spectrum I pass to that low-pass filter in that case the low-pass filter will just take out this particular frequency band and it will cut out all other frequency bands so since I am getting the original frequency spectrum of X T so signal reconstruction is possible now here you notice one thing as we said that we will just try to find out that what is the condition that original signal can be reconstructed here you find that we have a frequency gap between this frequency band and this translated frequency band now the difference of between center of this frequency band and the center of this frequency band is nothing but 1 upon TS which is equal to Omega s that is the sampling frequency now as long as this condition that is 1 upon TS minus Omega naught is greater than Omega naught that is the lowest frequency of this translated frequency band is greater than the highest frequency of the original frequency band then only these two frequency bands are disjoint and when these two frequency bands that disjoint then only by use of a low-pass filter I can take out this original frequency band and from this relation you get the condition that 1 upon delta T s or the sampling frequency Omega s in this case it is represented as FS must be greater than twice of Omega naught where Omega naught is the highest frequency component in the original signal XT and this is what is known as Nyquist rate that is we can reconstruct perfectly reconstruct the continuous signal only when the sampling frequency is greater than more than twice the maximum frequency component of the original continuous signal now let us have some quiz questions on today's lecture the first question what are the steps involved in image digitization process I repeat what are the steps involved in image digitization process the second question what is sampling what is sampling the third question here you find that we have given a periodic signal in time which is a periodic square wave in this square wave the on time is three microsecond and the off time is one my seven microsecond so you have to find out the frequency spectrum of this periodic signal so for this periodic signal on time is three microsecond off time is second microsecond seven microsecond so obviously the time period of this periodic signal is then microsecond you can assume the amplitude of this signal to be one and you have to find out the frequency spectrum of this periodic signal the fourth question if a speech signal has a bandwidth of 4 kilohertz a speech signal has a bandwidth of 4 kilo Hertz then if if every sample is digitized using 8 bits and the digital speech is to be transmitted over a communication channel then what is the minimum bandwidth requirement of the channel so speech signal is the has a bandwidth of 4 kilohertz every sample is digitized using 8 bits and the digital speech is to be transmitted over a communication channel then you have to find out that what will be the minimum bandwidth requirement of the channel obviously because the signal is digital so by bandwidth requirement I mean that what is the bitrate requirement of the champion the next question here again we have given two signals in time one is a periodic square wave the second signal is an empiric it is just a square pulse we can assume that on time of this square wave and on time of the square pulses them then you have to find out that what will be the convolution result if you convolve these two signals in the time domain so you have to find out the convolution output when these two signals are converted in the time domain thank you

Photography Audit Ineos, Runcorn

Photography Audit Ineos, Runcorn



all right photographing anything I can say actually got LOC complains sites yeah I don't work for them they do not affect me that's a mother you take the photographs of our sites what was that well my rights are I can photograph anything from a public papa so their policy is trying to trump my rights it's that don't stand for anything Casa de yeah why would I do that I don't you haven't even introduced yourself I don't new you are okay now okay have a good day on here which pits public on this side do you want me to move for for us okay not worry about it now now now as that [Applause] yeah yeah yeah Oh my purpose pleasure recreation hobby yeah and said to me the their PR doesn't like chalk refers it's a little bit ominous yeah yeah why what's that doing me photographing well can you tell me why you here well we've had a call from then telling you that I was on public footpath with a camera pretty much saying that you've actually to leave you can ask me to leave a public footpath tunnel so have you told on that okay yeah I'm just wondering why I'm even doing illegal activity well it's we're just trying to find out what's going on it does look a little bit dodgy someone there's a mother mama it's not against the law is it no boy it's my job to find out what's happening isn't it okay so you satirized satisfied your curiosity I suppose you're just gonna stay and carry on taking pictures yeah can I ask what it is you're taking pictures up anything that can see from a public footpath or everything I can see yeah two police cars these cars three personnel to security the guy that's doing illegal activity was well I was just going to taking illegal activity from a public footpath now we've got two police cars three police officers and the security undertaking illegal activity they mentioned why they're concerned yeah they said the their PR doesn't like photographers more of a security risk given what's what's the other side of the fence okay well that doesn't Trump my right to photograph okay Parliament doesn't agree with them more than otherwise there'd be a law here sort of stopping them doing it no and you don't even read vehicle that's what's that kind of doing anything with you or not I know but it just oh I know em is some wanton problem is is that I'm doing illegal activity got two police cars three policemen even though I'm just a guy with a camera and now you're trying to tie me to a vehicle what what's that got dude can you tell me the relevance of the vehicle because we're trying to establish if that is your be okay but why colleague is done a check on it why because it's alerting suspicious because that's where that's where the initial report came in there's a very trying to build a picture we've been told there's a male with the camera yeah in a red vehicle so we're trying to build a picture whether that red vehicle links to you was the male with the camera just don't see the relevance just don't see the relevance it in part to legally fit three police cars I'm finding this bizarre finally suppose our mom and dad had problems with the neighbor it was eight incidents and the police incident once and yet there's a guy doing illegal activity and I've got three police cars do you not find that a little bit odd taking an illegal activity how am i committing an offense I tell you what I'm a detained no okay I'm done talking okay there you are free to go that's I'm also free to stay honor quite like this last because she just basically kept her own counsel for for the whole of the encounter she just observed me Ronson and fellow officers talking bollocks one point she sent something and I didn't quite catch it so I had a look on the video later and it was following my comment the three policemen had turned up well she said was I'm a woman police month which I thought was quite humorous and I thought it was it was good that she only actually made one comment and it was completely correct and valid and I do stand rebuked and from now on I will use a gender-neutral term so hats off to her bye have a good day