The message will be titled living from the inside out The world we live in today typically lives from the outside in instead of the inside out Not long ago. I think a year or two. We've had this situation in the in the playground of our church Where a little hole developed and a surface of the ground started to kind of slowly cave in it wasn't a big hole So maybe the size of the ball at first and then the school that rented the facility Turns out that they investigated that hole and they found out it wasn't just a hole But this was a hole that led to a tunnel underneath Over playground in the church So they quickly closed that area off and they couldn't kids couldn't walk over there because they found out that there is a Height of a my dad's height size of empty space of a tunnel that was in our playground and You know the school quickly figured out how we all came to America through the tunnel from Alaska All the way from there and how most of you came from Mexico all through that that was underneath of our church guys I'm just kidding. That was not how we came here and not how you came here and So what happened is that the reason why they closed down the nobody from walking there nobody from playing there We couldn't park our cars there is because there was an emptiness that existed under the surface And in fact the surface started to slowly cave in into that Empty Well or empty tunnel whatever that was in we still couldn't figure out what it was Sometimes people live their lives and the surface of their life caves in into their soul And it's not that the life is heavy. It's that heart is empty We blame life and say well just my life is difficult But you know there are people who've been in a lot worse situations that you are and not only they came out But they thrived above that and there are people I've met and probably you have as well who actually on the outside have nothing going on That's bad and they're full of depression They're dying on the inside bleeding out on the inside and a lot of times you can have a small grass And it will cave in into that hole not because the grass is too heavy Not because the little children are too heavy It's that there is nothing under the surface that could sustain the surface See many Christians today live the same way where their soul has a hole and Everything on the surface in their life small pressure small problem or small success any kind of weight of Responsibility becomes so heavy to bear that it caves in now. We all collapse differently Some people when they collapse they drink some people when they collapse they become quickly irritated agitated Some people can sleep at night some people when they collapse they just go into drugs some people they go into pornography Some just simply become angry. We respond differently to when the surface Collapses inside of us, but the common Problem that runs through all of this is that our heart is empty Not our problems are too heavy We do need to sometimes rid of ourselves of certain things maybe get rid of some debt that toxic Relationships get a psychologist a consular go into marriage counseling Maybe perhaps lose some weight and perhaps stop this and stop that all of these things have their place But none of them will be enough to fix the hole in the soul Sooner or later the kids had to run in the playground the sooner or later You know the problem wasn't that the kids were too heavy The problem is the ground had nothing to support it And so when my pastor and Ivan and few others started to bring some dirt and Compressed the dirt in that hole it covered that hole and now in fact at this moment My car is parked right on that place where before it couldn't handle kids running over it See your heart is designed to be not a place that reflects your circumstances But a place which hosts the Holy Spirit and changes your circumstances The Bible says in Proverbs that Guard your heart above all things for out of it spring forth the issue of life And look it says that a good man out of the good treasure brings forth good in Both of these places or in John 7 verse 38. It says he who believes in me out of his heart Will flow out the rivers of water so I see three scriptures in which God says that Not the outside supposed to come inside But the inside supposed to come on the outside And so God doesn't want me to live from the outside in But because of the presence of the Holy Spirit he wants me to live from the inside out But before I can live from the outside from the here out I have to stop the intrusion The flow of all the garbage inside of my soul See many of our hearts are like septic tank Septic tank is something that is hidden and all the sewer from the house goes into it Many of us we become we turn our heart into a garbage can What all the problems of life find the resting place in the heart of our life and Then we no longer can change our circumstances. Why because we've been changed by our circumstances But the Bible says a man is transformed by the renewing of his mind and his life is changed when his mind changes The Bible doesn't say when all of your life changes then your mind your emotional state being your attitude will change That's not how it works in the kingdom of God You have the Holy Spirit living inside of you and because of that God wants to change your inside today And so out of that it will flow into your Circumstances and produce change in your circumstances. Are you with me? A secret place is not Only a physical place where I go to prayer to see and visit God a secret place is A state of mind in which God visits me Let me say that again a secret place is not just a place to which I go to meet God a Secret place is a state of my mind into which God comes and meets me here in here scripture says things like pray without ceasing We know that that's not possible to pray on your knees Without stopping day and night or at least every single day Paul knew most of us have jobs We have the school to go to we have families to raise and so praying without ceasing. That's not possible So Paul I don't think he was referring for us to praying like this without ceasing He was talking about something else where we can stay in communion with God Even while we're doing our duties responsibilities and household chores Jesus says abide in me as the branch abides in the vine and then out of that He says pray then to the father ask him whatever you want out of a place of abiding abiding is not just sitting and praying and reading the Bible it's a mental state of a person linked and Connected to God whether he mows the lawn takes photos washes dishes plays with children His mind his heart is somehow some way connected sends this pulses to God Meditates and God relies on God and thinks about God and out of that place that man Begins to then pray and his prayer is an extension of his secret place We all meditate Every person who says I don't know how to meditate if you know how to worry you know how to meditate Not all of us will pray all the time, but we all think all the time And the Lord wants us to turn our thinking into meditation Upon him now sometimes it's not easy to meditate now. Let me before I talk about the meditation Let me correct something today in our culture the topic of meditation has become extremely popular through yoga Through I mean I have it on my phone breathe app just during worship.   It's put on our phones the importance of conscious breathing and all kinds of you know channeling all kinds of energy and Most of that stuff is purely demonic No reason why it's because the meditation new age presents is all about emptying yourself The meditation the scripture talks about 23 times is all about feeling yourself Meditation the world talks about is all about detaching from the reality Meditation God talks about is always attaching to his presence his promise and his power The meditation in here is always passive Christian meditation is always aggressive It's a warfare Meditation you don't see meditation when you sit and you just chill that's not meditation and not not the kind of world We live in the kind of world we live scripture talks about meditation you take your thoughts captive it talks about think on these things That's that's aggressive. That's intentional. That's actually not trying to think about nothing That's trying to think about something so that's completely different and that's why this meditation can get you demons This meditation gets you miracles This meditation it says he meditates on him day and night and he will be like a tree planted by the rivers of water The word book of the law shall not depart from your mouth But meditate in it day and night and you will make your way successful and you will have good success This meditation produces miracles in partnership with Holy Spirit dear friends Secret place every person can have a secret place Without praying five to seven hours every single day Because five to seven hours every day already you and I think You don't have to do anything different to live in a secret place You just have to think different to live in a secret place You can still do what you do But change your thoughts from thoughts to talks with God in your thoughts You know how a lot of times in our thoughts we talk to people Like I'm gonna say this to them and I'm gonna reply I'm you know how they're and we have this whole conversation going and nobody else is there listening except you You know, what if that imaginary conversation? It's just switched a frequency My car doesn't have a Bluetooth To play music from my phone. And so what we had to do is we had to buy this Off-the-market device you put into this place where you create a smoking. How do you call that? not smoke detector the The lighter. Yeah, you put that into the lighter and and then what you do is that on the radio You switch to a particular frequency and the moment you switch to that particular frequency Everything from your phone begins to play through the stereo.  It's still there.  Come on Lord. Give me one more P His principles his peace and we can go to all other things that the Lord wants us to switch things on now I understand every single person here Let's face the reality when we begin to even think about thinking it gets it gets hard Sometimes it's the hardest thing to do is to actually think What I try to do to myself and I would like to encourage you to do the same When you catch your mind wandering when you catch your mind debating with people when you catch your mind arguing Fighting when you catch your mind worried and going on to that cycle You for a moment take a pause walk out from from that and ask yourself this question Who is more real? That which i'm thinking about or the Holy Spirit The Holy Spirit is more real Secondly Who is greater? That which I am thinking about Or the Holy Spirit the Holy Spirit is And number three who can actually change and alter my circumstances The fact that I'm worried about it or the Holy Spirit Sometimes Our mind is get locked in into that like a broken tape when it constantly rehearses something negative or something evil Let's imagine for example actually a gentleman came to me after the first service I mentioned the example of if you're have a flat tire You can change the tire and you realize you know your flat tire you need to buy a new tire Oh, actually you need to update all the all the tires and they're expensive and you don't have enough money And that thought leads to another one the fact that you're broke It leads to another thought the fact that your life sucks It leads to another thought that but the fact that all of your dreams are in a pause And you know what you don't like your life that one flat tire can lead into a train of thought What everything is so so bad All it takes to stop that train of thought Is a phone call saying Your dad Is in a coma Quickly your tire no longer problem Why because a bigger problem came it made that problem no problem at all That's how our mind works the only way to replace The unstoppable train of thought in our mind constantly is to give it something bigger someone greater And more powerful to think about and that someone is the holy spirit The holy spirit is greater than what you're worried about The holy spirit is more real than what you're conscious about The holy spirit can actually bring change to that situation That constant thinking about it isn't doing anything except bringing it more depression more fear and more anxiety In philippians 4 it says don't be anxious for anything But in everything in prayer in supplication with thanksgiving major requests known to god See means when you're worried about something you'll open your mouth and you say god i'm stressed out about this But i'm letting you know i'm giving that to you. I want to think about you I want to think about your promise. I want to think about miracles.  You're meditating and your meditation Protects you your meditation Actually invites his presence inside You can be right in the middle of fields picking cherries But the presence of the holy spirit is residing in you The same way judas was in the middle of the last supper But demons resided in him scripture says in john chapter 13 devil put on the heart of judas to betray jesus and then judas allowed those thoughts to come in He meditated on them though physically he was with jesus physically He got on his knee together with jesus Together with jesus they preached all of the stuff but on the inside there was a hole in his soul There was something else cooking on the inside and judas just thought oh, I just can't control these thoughts They're just overwhelming me little did judas know those thoughts had a sender They were made not in china, but in hell Those thoughts were demonic in nature. They were not his thoughts They've been planted there by someone and by cooking those thoughts Rehearsing those thoughts thinking on those thoughts what it did is it opened his heart and during communion A demon enters into judas That means you can be even in the right place, but if your thinking is wrong You will be visited not by the place you go to but by the state of mind you maintain If you maintain the state of mind that is negative You can be in a positive place And live a negative life God wants us to be whatever we are at today But to keep a mindset that is focused on meditating on the precepts on the presence on the peace and on the glory of god Overcome this myth. I can't do it Yes, you might not be able to change your circumstances.  Otherwise, bible wouldn't tell us to think on these things Otherwise, bible wouldn't say as a man think it. So is he it would say as a man is so he thinks Otherwise Paul and Silas Wouldn't be singing in jail. They will be whining and complaining in jail Paul and Silas in jail did not reflect their circumstances. They responded to god Meditated on god the back is hurting. There is blood coming out because they were beaten They were emotionally distraught because they were falsely accused by see they were shielded Because when you're in a secret place you are protected Your meditation provides protection for you But the best part of our secret place is the moment Meditating on the holy spirit throughout your day protects you At the same time as it protects you it powers you up Because god didn't send his spirit to protect you from the outside influence He sent his spirit to change the outside influence But before he changes those influences a lot of times he protects us from the intrusion of those influences I just want to take one more moment and remind some people here today Who have problems they caved on you that got inside of you and you're playing a victim You're like a thermometer walking around only Measuring the climate of your heart and telling everybody the reason why i'm so down is because my life is so hard That's not entirely true Titanic did not sink because there was too much water in the ocean There was always water in the ocean Titanic sunk because the water went inside of the Titanic Victor frank He said something that really touched me victor frank in 1942. He was a director of Neurological department in vienna He was forced by nazis to abort his child Him and his wife tilly They were deported arrested Very shortly after that his father died in 1944 so two years later His wife and his mom and him were sent to oschwitz Where his mom was pretty much burned to death in one of the guest chambers His wife was taken from him and he wasn't sure what happened to her turns out that pretty much the same year His wife died in some other city being only 24 years of age In 1945 he was freed by us Forces and he found out this terrible news that his wife is dead His mom is dead and his father is dead and pretty much Everything is really bad. He wrote a bunch of books, but in one statement. He said this Everything can be taken from a man But one thing The last of human freedoms to choose one's attitude in any given set of circumstances to choose one's own way It is the gift that god has given to you To not live from the outside in But to live from the inside out For some of us it will come naturally as simple as this your thoughts go bad You'll redirect them toward god For some of us we will have to turn our water into worship Some of us we will need to stop talking about our problem and start talking to our problem Some of us in here our thoughts are such a spoiled brat That they're not gonna listen to you.  I don't want to you know, touch him inappropriate I don't want to I don't I don't want to be rough with my thoughts. You can have to understand your thoughts are not always Resemblance of you. Sometimes they're running around like this crazy child And you got to get him and like the bible says in here you make them captive not the children Don't make the children captive your police for them, but your thoughts make them captive What do you do when you make them captive?  I know you only know about my sin. Let me tell you about the cross Because you don't know about the cross see, but there there is a cross It's bigger than my sin the thoughts will tell you by what this is what people say I know what they said.  You're folding laundry You're thinking about something. What if you would switch that to the frequency of the Holy Spirit? And think about God's presence God's promise God's goodness to you think about talk to the Holy Spirit in your thoughts the Holy Spirit You're my friend Holy Spirit. I love you Holy Spirit. Thank you for being with me What this is what happens is your heart is first protected From the outside influence and then you walk out from that laundry Matt or whatever you were folding your clothes and the problems are still there But you're no longer swimming like Peter Jesus helped me you're walking like Jesus and say anybody I can help right there Give me a hand Problem is still the same you are different Yes Right now The ground there has my car parked on it You can build a house on it. It will still hold it. Why not because the ground is not heavy It's because what's underground is strong But the best part about this Is not the Holy Spirit only guards my heart from outside intrusion Holy spirit empowers my spirit To do battle Because see problem is not the only one that's aggressive Water is such if you make a hole it doesn't ask for anybody's permission Water and the ocean did not ask titanic. Hey, how many people are there in titanic? Oh, there's thousands Nah, I'm not going to go into titanic. Why I don't want to kill all the people Water doesn't ask questions water doesn't give them a time to evacuate water aggressively forcefully Pushes his way its way. It doesn't matter who it damages. It doesn't matter what it does It doesn't matter if it's a structure. Some of you've seen floods. It goes through a highway It puts cars and moves cars It takes larger structures and levels them and moves all the levels the hard structures because that's the force of water There is another force that exists Jesus says in john x chapter 1 verse 8 when you receive the holy spirit you will receive In original language that word is dunamis which is explosive force See holy spirit is not just someone who comes in closes down all the windows say let's hang in there until Until rapture why just things that are so bad But I got you guys come over here little chickens under my under my wing. Let me let me hide you holy spirit is c4 He says which buildings do we need to bring down? He comes in first and he says let me cover you He says let me protect you He says let me cover you let me protect you But after that he says I got too much of c4 to just simply stay down See when jesus had peace in the storm he didn't just wake up and told disciples. Hey guys. Look at me I can sleep in this storm He says I can sleep in this storm that means I can speak to the storm That means I can stop the storm And he rebuked them. He says why aren't you guys sleeping? Why aren't you not doing anything about the c4 that's been given to you the power that's been given to you The holy spirit that lives in me. He protects me from the outside only to power me up to influence the outside To intrude on the outside To step upon the outside to walk out from the outside and to tell that problem listen problem You're not the only one that's forceful. You haven't met the real force yet. He's so much stronger than you I know you would like to intrude on my peace I would like to intrude on you and we would like to bring those structures those walls of jericho down come on somebody smith wigginsworth One time went to a funeral. It was a five-year-old boy that died He wept at that funeral because this boy has so much life still in him He asked everyone at the time it was funerals where you know, it wasn't like this right now where we have The the dead boy could stay there with her family And so he asked all the family to leave. He said give me just a few moments He went closed the doors took the the boy out of the casket He was a big guy. So he dragged them out. Nobody nobody was there because this would be really bad He puts that dead boy to the wall Dead boy keeps falling off. He says stand He puts him leaves him and walks on the other room on the other side of the room and begins to command life to come into a corpse How is that even possible? How can the man Take something that's dead and speak life to it It's possible if the bible says guard your heart because out of it flows things See, we're only used to garbage flowing in God says my spirit makes power possible to flow out In john chapter eight it's in chapter seven it says that rivers of living water will flow out Meaning and these rivers they carry life Whatever these rivers touch they can bring life And that boy five years of age who was dead? They had his funeral walked from that wall to that guy Now he says I've never seen this happen before but it happened And then when the doors were open to both people alive walked out because a man Carried not only a presence that protected him. He carried a presence that powered him up There is a power in the holy spirit to protect you But that power is enough to power you up To give power to your voice to give power to your command to give power to your prayer To give power to your confession to give power to your fasting and to your prayer somebody give us some praise for power Somebody give us some praise for power The holy power God power God power Some trust in green power Some trust in black power some trust in white power. We have the holy ghost power It's the best power. It's the clean power.  These have turned the world upside down It didn't say about them. Oh, we persecuted them. We crushed them fed them to the lions, but they're still happy They were more than happy They were conquerors They influenced their world for the kingdom of god. They didn't just protect it in their peace. They let the river flow out Have you let your heart become a septic septic tank of all the sewer? Or have you let it become a fountain of living water where things come out?  You're simply you're mad. Why because everything is bad Meaning your heart pretty much just tells everybody where your life is God wants your heart not to be a thermometer.  Will you punch in what the lord says about you?  You are a walking light You carry darkness has to leave where you walk in it might not leave the earth But it will leave where you stand. Why because you have a river of living water that protects you from the outside But it cannot protect the outside from you Shirley and Ron were in a accident where a drunk driver hit them Shirley quickly became Useless became a vegetable. She lost her sight Her hearing intensified she could hear through the thick walls She wasn't able to move The spine was broken things were just shattered and the doctors did everything they could all the surgeries all the stuff And then they were not able to fix her up and they sent her home to die And Ron himself was damaged because of that accident But a little bit less than his wife and they both sit pretty much in misery They started to seek for solution for seven years. They were looking for an answer from god She wasn't dying but she wasn't living and nor was he and one time he got so fed up. He took some tapes of healing scriptures It was during the time of tapes not the cds or podcasts He laid his hands on the tapes and he said lord, we're gonna listen to these tapes until we die But you either heal us or we're gonna die listening to this but we're not gonna live the same 18 hours later of listening to healing tapes tired and exhausted But you know when you listen to that for so long Your sinkhole becomes filled Your body might still be sick your mind is no more sick According to him you can watch his testimony on youtube. He said He felt electric light Like an electricity went from like the roof of his from the ceiling and the roof of his house straight into his chest He thought he had a cardiac arrest That's why he saw he said the light he quickly fell out of the chair landed on the floor Thinking he's dying Little did he know it was a visitation because he your meditation prepares you for visitation Visitation of god came he opened his eyes. He thought he was in another world already It turns out he was in the same kitchen and there was sick wife sitting still listening to the tapes He quickly gets up and realizes completely healed Grabs his wife and says listen honey, we were both in the same accident There was no way god will just heal me and not you if we were both in the same accident get up And his poor wife gets up with him He begins to speak over her he says begin to declare god's word And he just went forcefully with her and right there and then that healing that was in him Start manifesting in her and now it's been seven years and this couple is serving god completely restored for the glory of god What is that? Your meditation prepares you for visitation, but it's more than that It sets you up for transformation What you meditate on constantly The goal is not to pray a lot Is to think about god a lot and let that spill into prayer Let that let your prayer come out of that because for some of us prayer is just two hours of warning It's just 40 minutes of anxious thinking that prayer does you know good? It does god no good does nobody good god wants us to abide in him to allow his word throughout the day You might not be able to control all of your thoughts control dominant ones and replace them with god thoughts Talk to holy spirit think about his goodness Think about what he's done And if you're not able to do that find a youtube channel listen to some testimonies Listen to some sermons watch some services turn on a worship music Do things that will stimulate your mind to think Opposite of what you're going through so that your thermometer becomes a thermostat and you change your situation Somebody you got some praise david hogan david hogan i think it's about 30 something people that Was raised from the dead through personally through him and through his team about 500 people that were raised from the dead And right there in the in the jungles in the remote areas in mexico where he was a missionary He said that I decided to reach the people who don't know about jesus and I wanted to see god move powerfully And so he was he was a little bit It's a little bit non-normal guy because he wrote all the miracles in the bible and decided to put Raising of the dead as the miracle he would want to start with Usually raising of the dead is the miracle You hopefully end with one of these days, you know you start with back pain, you know headache You know something slower and so he's like you know what? I'm just gonna put it that raising of the dead is what I want to start with And so the moment he started to believe for raising of the dead the problem with that is that you have to have people dying This is the only miracle that requires death So you don't want to start with that miracle because that means people need to die four years Witches and warlocks attacking him things are not happening and he said I've never seen it Never heard anybody up to that point, you know happening with this and then one day He said prayed for hours and in the jungles one guy came to me and says David could you come please and pray for my son? He is terribly ill It took hours to get to that house. They come into that hut They're healers and spiritualists all kinds of people doing their chance because I guess was not a christian family And after they did everything they said hey, well now it's your turn. Try your god. He says I prayed in english Nothing prayed in spanish Nothing I prayed in tongues Nothing I prayed in indian nothing Then he says I got up and I started weeping And I said god for an hour he wept in front of that boy put his hand weeping over a dead boy And as his his face was in his chest He said I stopped weeping and I realized the heartbeat came back And the boy got up and god resurrected the boy from the dead And he says this is how the first time I've seen the resurrection He says I never read a manual. I did not know the formula how to pray I just knew one thing greater is he that is in me than the one that's in that And I decided let the river flow out of me into that situation You might be facing something today that's terminal. You might be facing something today. That's that's impossible We might pray for it. We all might have prayed for it for a very long time You might be watching us right now and you're facing something that the doctor said there is no hope for that Maybe you are drowning under the weight of your problem I want to tell you something today.  He wants to protect you from the outside influences But not only that He wants to fire you up. He wants to show the world Who's in charge? He wants to show your problem. He's way greater way bigger than any other problem He wants to manifest his goodness in your life and his love and his mercy and his compassion He wants to protect you. I feel like in this room.  And today we're not here to judge you.  I recognize that's me I recognize i'm the sinking hole christian. I am on the inside I don't meditate my thoughts have taken a turn what it's draining me and today i'm battling with things I I take take pills to sleep. I can't function and all of these things and I need some help today Is your day or the lord not only wants to pull you out He wants to come inside He wants to fill you and overflow you into your circumstances.  Why because the spirit the spirit It's not by mind. It's not by power.  We believe that God will visit you right now in this room


Another important objective from the lesson, and really a very valuable skill, is the ability to extract some information from contour maps. You'll see contour maps on TV weathercasts and on weather websites. So it's very helpful to be able to gather some information from them. This is a map of surface temperature at 23Z on Monday, January 6th, 2014. So if we do the time conversion, subtract 5 hours to get eastern standard time. That's 1,800 hours or 6 o'clock in the evening, 6 p.m. In the eastern part of the United States, we subtract 8 hours to get the time on the west coast to get the Pacific time. And that means it's 3 p.m. Pacific time. So this is a map showing temperature in the late afternoon and early evening across the United States. You can see there was some very, very cold air. There was an outbreak of cold air in the upper Midwest and the Great Lakes. Temperatures were well below zero. We can estimate the actual temperature pretty much anywhere on the map if you know how to read a contour map. We know from the lesson that these lines are isotherms. They represent lines of constant temperature. And we have to know what our contour interval is in order to interpret the map. Here our contour interval is 5 degrees. We see a 30 degree isotherm here in northern Texas. The contour immediately to its north is 25 degrees. So each contour represents a change of 5 degrees compared to the isotherm that it's adjacent to. So based on that, we can find the temperature, at least estimate it, anywhere on the map. If we pick the spot here in central Ohio where the cursor is, we know that the temperature has to be between minus 5 degrees and minus 10 degrees because it falls between those two contours. So it's colder than minus 5, but it's warmer than minus 10 in central Ohio. We also can use it that our knowledge to our advantage to see what the temperature is, even when the contours are not labeled. We see this unlabeled contour here in northern Minnesota along the Canadian border. And we know that temperatures along that contour are minus 20 degrees because our contour interval is 5 degrees. This is the minus 15 degree contour running through central Minnesota. The next contour representing colder air would be minus 20 degrees. A point inside that circle would have a temperature of 5 degrees. A point inside that circle would have a temperature lower than minus 20 degrees but higher than minus 25 degrees since no minus 25 degree contour actually exists on the map in that area. So we can say that it's lower than minus 20, but we know it has to be higher than minus 25. Another thing you'll find is that some websites have some strange conventions when it comes to shading contour maps. This particular map, the shading, we'll focus on the shaded areas. They represent wind speeds at about 30,000 feet above the Earth's surface. And the strange thing about the convention on this website is that the shadings repeat themselves. So not all areas shaded in light gray, for example, represent the same range of wind speeds. So knowing the contour interval is again the key to being able to interpret the map. On these particular maps the contour interval is 20 knots and the shading start when wind speeds reach 70 knots. So the light gray shading here starts at 70 knots. Then the dark gray starts at 90 knots. The white starts at 110 knots. But then the colors repeat themselves. We go back to light gray, but that means 130 knots. Then the transition to dark gray means 150 knots. And the transition back to white is 170 knots. So knowing that we can find out or at least estimate the wind speed at pretty much any point within these shaded areas. I needed to know the wind speed here, say, in central Missouri. I know that it has to be somewhere between 70 knots and 90 knots because it falls between the contours of 70 knots and 90 knots in that light gray shaded area. But if I needed to find out the wind speed here off the east coast of the United States in the white shaded area, I would have to count contours to know what the wind speed is there. We start with the outer light gray shading. We have 70 knots. Then 90 knots when we transition to dark gray. 110 knots when we transition to white. 130 knots when we transition back to light gray. Then 150 knots. And 170 knots when we start the white shading. And since we're inside the white shading, the wind speed is greater than 170 knots. But it's less than 190 knots since there's no contour or shading representing 190 knots.


I'm Jillian Jorgensen. I'm the Education Director for Bookit Repertory Theatre. My name is Nora. I'm in sixth grade. My name is Ruchi. I'm in second grade. For today's lesson, we are going to explore a story called a very deep hole in the ground with a very dangerous creature at the bottom. Dun, dun, dun! Okay, to do this story, you need a lot of imagination and you need a few props because we're not really going to dig a hole in our apartment floor. Here's what you're going to need. To make your hole in the ground, you'll need something to make an outline of the pit. Blue tape or yarn or string. You could also use pillows to make a border. You could even use stuffed animals. Any of those things will work to make a pit. Hey, Nora. What should we use to make it look like there's a pit in our apartment? Well, since we can't dig a hole, we could build things up from the ground. Oh, yeah, yeah, yeah. Okay, so that's one way. What else? What else could we do, Ruchi? Well, if we built things up from the ground, if it was a very deep hole, then we couldn't exactly step over the things. Just be like, hey, this is cool. It's not too tall at all. Oh, yeah. Okay, so what we're trying to figure out is how we're going to make that hole and it takes some talking, just like how I was talking to Nora and I was talking to Ruchi. So when we actually make our hole, our very deep hole in the ground, we're going to take some time to talk to each other to figure something out so that we all agree about how it looks. Okay, we've made our pit. We used masking tape and taped it right on the floor in a rectangle. That's the shape that I used, but it could be a circle or an octagon or a rhombus or any shape you want for a pit. If you live somewhere where you can't tape on the rug or the floor, you can also make your pit out of pillows. You can make a shape that is a border of the pillows. Now that we've got our pit, there's only one thing to do. What? Fall into it. Nora? Yes. Will you please fall into a pit? I will. Okay, so this very deep hole in the ground, Nora knows where it is. There's the solid part and we know this is very, very deep. Okay, Nora, take it away. Look at me walking on this very stable ground, looking at this very stable forest where I'm walking and I'm not expecting a pit, but I mean, what could go wrong? Oh my gosh. Oh my goodness. My poor child has fallen into a very deep hole in the ground and I have learned that if I wanted to try this again, I might make my pit a little bit larger so it could really look like falling down. Nora, hey, what's down at the bottom of that pit? Sharks. Sharks. Oh, no. All right, get out of that pit. Ruchi, are you ready to show us your terrible fall into the pit? In slow motion. Oh yeah, will you do it in slow motion? Yeah. Awesome. Okay, going over. Oh, look at that. See, it's only a pit when we need it to be a pit. It's a pit now. Nora, can you scooch that way a little bit? No, thank you for asking for space for your body. Oh my goodness. Ruchi has fallen and rolled all the way down. Ruchi showed us in slow motion that she could do something a little more dangerous, a trip, and then falling on her head, but she protected her head. Do you like that? Hey, Ruchi, what's a one word thing of something that's down at the bottom of the pit with you? Dirt. Dirt. Hey, my friends, if we had some really dangerous animals at the bottom of this pit, some very dangerous animals, I would be very scared. So instead, I know Nora and Ruchi have each chosen one of their own stuffed animals. Nora, who did you choose? I chose this very dangerous skunk and her name is Roosevelt. I chose this super ferocious cheetah and her name is Licky. Okay, thank you. Will you please show the time that Roosevelt and Licky were racing each other and didn't know what pit was there and fell in? When I say once upon a time, you show that race. Got it? What am I going to say? Once upon a time. What am I going to say? Once upon a time. Okay, go ahead and put Licky on this side so we can see Licky. There we go. Once upon a time. Ready? What are we doing again? We're wasting each other from the other side to this floor. Oh, so you're going to be where I am and I'm going to be where you are? Yes. And we have to see who gets to the other side first. Okay. Ready, set, come down and see what's going on. Nope. Thank you, Roosevelt. Thank you, Licky. Now we've got two dangerous animals at the bottom of the pit. And they're very angry. Okay, leave them there. Ruchi, come back closer to me. What are we doing? All right. Now let's imagine what could happen next in our story. Ruchi, you just said that they were angry. So now we've got the story of two angry animals down there. Ruchi, would you want to act it out? Write it out or draw it? Actually. Oh, yeah. I noticed that Ruchi was having pretty good time using her animals and her body and her voice to imagine this whole story. Nora, what about you? Would you want to write it down, act it out, or draw it? Well, I think my first choice would be to act it out, but I could also draw it in like a comic book format. Oh, sure. Cool. Yeah, with like different shapes and the shapes of the pit, too. Yeah. I think that what I would want to do is actually go back to the other activity and just keep falling and falling and falling in a pit because that sounds really fun to me. Same. Yeah. Because it's not even real, but we still get to do it. To fall in the bottom of a very deep pit and then maybe rescue our animals. Maybe rescue the animals. Yeah, but if we rescue the animals, we have to get them out of the pit and now we're going to do that. I don't know how we get them out of the pit. That's our story and I wonder what your story might be. I really love drama true because I get to explain things that are scary in real life, but I know that they're safe in my imagination. Drama true is when you look all around you and it's your imagination that you see. It's kind of like pretending with a purpose. Real true is when everything is just as it is. Sometimes my imagination does run away with me in drama true and I need a little help to find my way back to real true. Sometimes my helpers are Nora and Ruchi, the two kids who are mine who did the story with us today. You can do the story of a very big hole in the ground with a very dangerous creature at the bottom with your family or with your neighbors or you can even figure out how to do it all by yourself. Happy creating!


Good morning and welcome back. I have some questions here. I will try and answer them. Question from online university is actually an observation that I send my question through email to workshop support. Just please check it and answer the same. Yes, I will do that. Unfortunately, I do not have access to email here directly, but I will get to the workshop support. The second question is technical from Amruta Puri. Can all recursive functions be mapped to an iterative operation? Generally, the answer is yes. They can be. Although the resultant implementation may not remain as elegant as you see in a recursive implementation. You may want to use some specialized data structures to implement recursion. Stacks are particularly important in this context. There was one more question there. Yes, it was from Pune. Can we do our project in C++? The answer unfortunately is no. I will tell you the reason. The projects that you will do later on till April are supposed to contribute to the contents of this subject portal. Since this subject, as we have all agreed, is around the basic programming which is universally in this country taught using C or a procedural language. Therefore, we will restrict the projects for this particular thing in C program. As I promised earlier, we shall have a separate workshop on object-oriented programming during which time you will be free to do a project in either C++ or Java, depending upon whatever we choose. Let us get back to the discussion. As I had mentioned, there is a query that image processing or image representation and handling should be discussed in some greater details. That is what I am going to do today. First, I will describe the mechanisms available for representing digital images. Then, we take a specific image type namely the fingerprint image and see what kind of analysis can be done of that image. First, some basics. Image is represented in some standard digital file formats. There are tools and utilities to handle these formats. We will be discussing a particular file representation called XPM representation. This is not a very popular representation for handling large images. It was meant for a different purpose which I shall explain, but it is an extremely simple representation to understand. We will then look at a sample program which uses an image represented in this XPM format and does something useful with it. Tomorrow morning, I hope to demonstrate to you how fingerprint images are retrieved from a scanner and how scanner software and application programmer interfaces are used to write a program which connects the scanner to my computer and we can actually capture fingerprint images. Now, please understand that a digital image could blow up in size very, very quickly. Consider a modern camera which you often designate in terms of number of megapixels that it is able to capture. A 12 megapixel camera that means a camera which can take a picture containing 12 million pixels can produce an image with the size of 36 million bytes. Why? Because each pixel will typically a color image pixel will have value for red, value for blue, value for green each represented in an 8-bit number. Consequently, each pixel will be represented by 3 bytes and you will end up with a huge image of 36 megabytes. Clearly, it is not conducive to handle such large sizes for individual images and some compression becomes necessary. Compression can either be lossy or it can be lossless. There are many formats. The two most popular ones is a JPEG format. Almost all photographs that you see sold on digital machines are JPEG photographs. It is a lossy format but it gives very acceptable quality. In fact, reasonably good quality. Bitmap format can be completely lossless although it also provides for compression. As I said, compression need not always be lossy. There are several other formats available. Incidentally, a file containing an image which is in JPEG format will typically have an extension not JPEG or not JPG. Similarly, a bitmap format which was sort of defined first by Microsoft in a very popular format has an extension dot BMP. There are many other formats also. We now describe a peculiar format which is called XPM format. The most file formats hold binary data because a value let us say 0 to 255 as an intensity value for a black and white image is best reprinted as a 1 byte number. But these data values are not visible to us because they are not in a printable format. They are in internal binary format. Consequently, they need to be read by a machine. They need to be processed by a machine. All that we can see is a photographic output or a digital output again in terms of internal representation which is converted by some utilities such as Photoshop, photo editors or photo displaying tools which can display that image on a digital screen. There was a need felt of what we call editable format specially to create icons using normal text editing. Icon are short symbols. You know which are typically used in advertising agency. So in 1989 a group of people in France defined this format. Group Bull Research Center. Bull incidentally was one of the large computer manufacturing company and they had a very, very well established research center that is where these people were working. This format is very peculiar in that it is an ASCII format. So actually you can print the contents of a file as ASCII characters and you can actually see what the contents are because the description is simplistic and still well contained. So let us look at what this format looks like. This format has lines of text describing an image. The first line incidentally all lines of text together will actually form a component of a ASCII program. So that is how this format is defined. The first line always contains the word XPM enclosed in slash star star slash. You will notice that this is nothing but a comment in scene. The second line says static care star some name, PIXMAP name like my major image or whatever. Notice that this is an array and this is being defined as equal to opening brass followed by string, string, string, string, string. So in fact this is nothing but a pointer to an array of strings. So this is effectively then a two dimensional array. The picture is a two dimensional array. The first element is a row. So there are number of rows which will be equal to the number of lines in the image file and number of columns. Each column will correspond to a string here. The first string is value string. The next string is color string. There could be multiple colors used to represent individual pixels. So these are not colors but actually color codes and then there are many lines corresponding to pixels. So if you have an M by N image you will have M rows of N pixels each. Each pixel is represented not by a single value but by one or more ASCII characters. Consequently the number of characters describing one row of image could have many more characters than the number of pixels that you have. If one pixel is represented by two characters then you will have twice as many number and so on. We will look at an actual image in a short while to understand exactly how this XPM format works. So to recapitulate the first line of a file containing XPM format image will contain the word XPM preceded by slash star and followed by star slash. The next line will be a fixed line which says static care star and this will be a name. Typically it is not uncommon to give the same name as the file name in which the image is stored. That file name typically has an extension dot XPM and in terms of semantics this whole structure defines contents of a C program. So all of this can be incorporated in a C program. In fact that is how programs were written to handle these images. The image itself becomes part of a structure of a C program. This has subsequently number of lines. First it has a single line called value string. We shall see what exactly that value string is. Then we have one or more lines describing the color codes and then you have as many lines as there are rows in the image. Let us look at some details. First of all what is a value string? The value string contains values width, height, number of colors and characters per pixel and these values are four values 1, 2, 3, 4 separated by blanks and these values are enclosed in double quotation mark at the beginning and double quotation mark at the end followed by a comma. So this is actually a string. The next one is called a color string which is array of key and color values and each element of this string is something like key, then a color code C and an excitation value of the color again written as a string. So there are three items in the string, a key code. The key will consist of one or more ASCII characters chosen by you arbitrarily and these ASCII character codes will represent a particular color. The color value itself is given by this excitation. How many bytes will be there in key? Well that will be determined by the value string characters per pixel. If you have said that there will be one character per pixel the key will be one byte long or one character long. This will have to be a printable character by the way. So one character does not give you too many printable characters about 126, 127 if you use ASCII code. It is not uncommon to have two characters representing a pixel because combination of two characters can represent literally thousands of values. So this then is the color code character followed by the hexadecimal value of the color. If you are using two characters per pixel these two could be absolutely any arbitrary characters of your choice. You can say x dot a, a, b, t, z, q whatever you choose. Wherever that combination occurs in the actual pixel representation that is supposed to mean this particular hexadecimal value of the color. So consequently you have as many lines as different color codes you have or effectively as different gray level possible or color level possible in your image pixels. Please note that each picture can have its own color code. I have utilized this fact to define my own color code here and then there are pixel strings. How many pixel strings? Well if the picture is width, number wide and height number rows then this pixel strings will be as many pixel strings per row. So if height is height then there will be height number of rows and each row will contain width multiplied by the cast per pixel characters. Essentially then pixel string is also a string and notice how the string is written. It starts with a double code then it has these series of characters. These will represent by the way the actual color code corresponding to a pixel. So for example if x dot x and dot is used to represent let us say certain value of red, certain value of blue, certain value of green then wherever x dot occurs it will mean that that pixel is of the same color. And this combination will depend upon the kind of color coding that you have used and the kind of actual values that exist in the digitized image originally captured. But suffice it to say that even each pixel string is written actually as a string. It has a double or first of here at the beginning, it has a double or first of here at the end and a comma. So these are comma separated strings that you will find in XPM file. Here is a sample image. This is called a dot image by the way. Incidentally the image is restricted to this area. So this is actually the image. It in fact looks like a dot if the aspect ratio is correct. But look at how and in fact if you interpret this and show it on a screen you will actually see a small dot here. So let us see what this file contains. The first line is an XPM comment. The second line is static care star dot. Dot is the name of the file. This is an array. This is followed by a value string which reads 5521. If you recall what the various data items were in this line, the first one is width, the second one is height. So it is a 5 by 5 image. That means this has 5 rows of pixels and in each row there are 5 pixels. In fact it is a very small image of 5 pixels by 5 pixels or 25 pixels and that is why you will see when you represent this as a digital image you will see a dot. Notice the color coding scheme that they have used. It says two characters are used to represent each color. There are two colors in the whole scheme and one character is used to represent colors. That means the pixels here are capable of showing only two colors. They need not be black and white by the way. For example one color can be red, one can be blue, one can be black, another can be magenta, whatever be your choice. That is the reason why a two color image can be represented by this and can be correctly interpreted. So once again it says this is a 5 pixel by 5 pixel image. It has two colors and each color is represented by one character. This is now followed by the color code key strings. So let us see what these strings are. This is the first one. This string has a dot. That means dot is a symbol used to represent a color. What is that color? The color is given as an hexadecimal code 0 0 0 0 0 0 0. That means this color is all zeros and what is all zeros? All zeros is black. So the dot represents a black. Here you have an X. What does X represent? This code says X is a color with a value hexadecimal ff 0 0 0 0 0. Typically these are sort of hexadecimal numbers. So that means this is one byte, this is second byte, this is third byte. And traditionally the first byte is supposed to represent the intensity of red, second byte of green and third byte of blue. Since green and blue components are zero, this color is actually red. Consequently you have a black and red image. The black is represented by a dot and the red is represented by X. This is followed by 5 rows of 5 pixels each. Notice what these pixels contain. Dot dot X dot dot. That means the first pixel color is black, second pixel color is black, third pixel color is red, fourth is black, fifth is black. This one has first as black, next three rows one black. This one has all five red. This one has one black, three rows one black. And this one has two blacks, one red, two blacks. It is a very simplistic image. It is an icon of a dot. But you can see that this simple coding scheme can be extended to represent the most complex image that you can come across. So for example, instead of a 5 by 5 image, you may have a 500 by 500 image or 300 by 400 image. Instead of two colors, you may have 1000 colors. Depends upon what kind of different colors you want to represent. And instead of using one character to represent a particular color value, you can have two characters represent a color value. You generally do not need three characters. Two ASCII characters in combination give you adequately large number of colors to be represented. Suppose we had gray scale images.  Incidentally fingerprint images are all gray scale images. So each pixel is a shade of black to white. It is not pure black and white. A black and white is called a monochrome or monotone image. So monotonous that means either black or white. Every pixel has only two colors. And a gray scale image has shades of gray, shades of white, shades of black, whatever. And gray scales can be represented as a 1 byte pixel value internal. So the numerical value associated with the pixel can be between 0 to 255. It adequately represents a gray scale image. But if we want to represent a gray scale image using an XPM format, then what you can do is that first you can represent a gray scale by choosing color keys or color codes which are identical red, green and blue pixel components. Please remember that 0 red, 0 green, 0 blue will mean black. FF red, FF green and FF blue will mean white. And an equal combination in any other value will mean a different shade of gray. For example hex 0 0 0 0 0 is black, hex FF FF FF FF is white and hex 808080 is an intermediate shade between black and white. So all shades of gray can be represented in this mechanism by using actual colors. Of course you have to say this is the color value that you would like to have a pixel to have. You will have to give a code in terms of one or more ASCII characters. Clearly one ASCII character will not be sufficient. So you will use two ASCII characters to represent a color. And once you have decided what is going to be your color coding scheme, you can then based on the actual values of the pixel of the gray scale image, you can convert that pixel value in the appropriate key combination of two characters and then write those many characters in your file resulting into an XPM file representation of a gray scale image. Here is a sample fingerprint XPM file. So this has slash star XPM star slash static care star 80 0 percent 2. This is an arbitrary file name that I have given. This means left thumb. Zero error trial that is the first time you capture. Person 2 means person number 2. This is, this would roughly be the file name that you will use although it is not mandated. Now the string itself says width height encolors cares per pixel. This is included as a command. And what are the values? 352, 544, 256 and 2. What does it mean? To recall from our previous explanation, 352 is the width. 544 is the height. That means this particular picture has 544 rows and each row has 352 pixels. We are saying that totally there will be 256 colors. Obviously it is a gray scale. So 0 to 255 will be the colors and each color will be 0 0 1 0 1 0 1 0 2 0 2 0 2. Remember what I said, red, green and blue in exactly equal measure will constitute a gray shape. And finally this value string says that each of these 256 colors will be represented by two ASCII characters. Which two characters? Experient format does not say that you have to use these specific characters to represent this color. It says use absolutely any combination of two characters that you want. However, please define in the same file what that particular code means. For example, I have chosen to use capital A and small a to represent full black. So this is where AA is defined as colors 0 0. Capital A small b is defined as colors 0 1 0 1 0 1. Capital A and small c is defined as this color. And since this is going to successfully go over from 0 to 255, 255 remember in hexadecimal will be ff ff ff. So the scheme that I have chosen is extremely simplistic. Although I will write these details in an xpm file. But by looking at the code I can very quickly determine what the color is. Why? What I am doing is I am keeping capital A constant for the first set of letters and varying a b c d e f g h etcetera. Not 26 times, not up to 0, but say 25 characters in arbitrary choice. After finishing the first 25 characters of the small alphabet, I change the first character on the left hand side from a to b. And next 25 are reprinted as b a b b b c b d etcetera. The subsequent next 25 are reprinted c a c b etcetera etcetera. And I continue this till I have reprinted all 255 elements. Observe that this simple coding scheme permits me to quickly calculate the gray value of a pixel given its code. We shall see in the program how exactly these calculations are done very simply. Here is a fingerprint image of a person. You might see it as slightly blurred image and that happens because the image is a gray scale image. So it is neither white nor black. You will notice that the background is all white. There are in between blackish lines, but not fully black lines. Now what you would like to do is you would like to sort of stretch it first and digitize it to a black and white image. So if you do what we call a histogram equalization and convert this image into a pure binary image, 0 or 1, you may get a picture of this type. This is another picture. So these are fingerprints of two different persons. I have used this illustration to tell you a well known fact that fingerprints are unique. As you can see here, although both are fingerprints, this fingerprint has a pattern which is significantly different from the pattern that you see on this fingerprint. And anybody by visual inspection can say, look this fingerprint belongs to somebody else, this fingerprint belongs to somebody else. Even if you have fingerprint of the same person taken at different times, here is a set of images captured at different times. Both these fingerprints belong to the same person. By the way an expert can see very clearly that they are similar. However, it is interesting to note from a digital image point of view that there is a slight tilt in one image with respect to another one. There is a slight shift also. Consequently, these particular patterns that you see here somewhere around this excess, you will see that these patterns here are somewhere around this excess. That means this particular fingerprint it was kept on the scanner was kept at a slight angle and not the entire surface was covered exactly in the same way as this surface was covered. This in fact is the greatest problem in handling digital images. Ordinarily, when we compare two entities, we are used to comparing exact values. Is value of m equal to n? If it is, we say they are same, otherwise they are not same. In this we will be tempted to say that if we have let us say 500 by 300 image, then each pixel point we can compare with the corresponding pixel point. And if all pixel points agree in value, we say the image is same. Very unfortunately image analysis completely prohibits this kind of simplistic comparison because a very small change in the image could cause huge differences in comparison. This small change of about 5 degrees change in the orientation of these two fingers will ensure that a point to point comparison of pixels will never be able to establish equality. Consequently, we have to look for patterns on the finger. And these are the patterns that we are talking about. These patterns incidentally are called minutiae. Say minutiae are patterns which are characterized or identified because what you see here as these lines, these are called ridge lines and valleys. There are sort of technical terminology which will not go into the details. Suffice it to say from a computer programming perspective that even if we represent these two images as a two dimensional array of pixels of grayscales, a pixel by pixel comparison is completely ruled out for any kind of establishing the fact whether these two fingerprints are of the same person or different person. But that is a later issue. First we consider whether the quality of the image that you get by this process is adequate in a grayscale. The answer is no because there is very little clarity. We would like to therefore enhance this image. You will remember we had talked about contrast enhancement by equalizing the histogram. The best technique for a grayscale image which is actually a fingerprint kind of pattern and not really a scenery or something is to convert 0 to 255 values into 0 and 1 value. When you do that, the processing of grayscale image will convert this into a bi-tonal image. Now how do you convert it into a bi-tonal image? Very simple. You have values ranging from 0 to 255. You can arbitrarily decide that any pixel value which is less than 128, it is black, otherwise it is white. Or you may use a better threshold such that the average pixel value in the image is used as threshold. This exercise is very simple to do. You take an image, read the xpm file decoding the cores that have been used and convert the pixel image into internal values. Internal binary values, each value we put into 1 byte and there are as many bytes as there are height multiplied by width number of pixels. Now having this digital representation, you can simply look at each pixel. If the pixel value is greater than certain threshold, you may announce it to be white. If it is less than certain threshold, you may announce it to be black. Visibly the quality of the image improves significantly as can be seen by a few slides here. So here again is image of a fingerprint of a person. Incidentally, I have used dot bmp5 in my slides. You can take these out, convert them into jpeg. You can convert them into xpm file. However, most modern tools like photoshop, photo editors or photo display tools etc. are not capable of displaying xpm file directly. But almost all these tools come with a conversion. So you can say convert this into bmp, this into jpeg, jpeg into this or whatever. That is what I have used to display it for your benefit. Digitally of course, it is a set of values organized as a two dimensional matrix whose dimensions are defined by width and height of the particular image. So if this is the image of the fingerprint of a person, then by converting a grayscale image into a monotone image or a bi-tonal image, 01 image, you will get something of this sort. Well, instead of the picture becoming clearer, we seem to have lost clarity. This picture appears to be better. Why this has happened? This has happened because we have arbitrarily chosen to generate this image by using a threshold which is 120. The threshold cannot be arbitrarily set. The threshold has to be set in the context of the actual pixel values that you observe in an image. And as I mentioned earlier, using the average is a much better mechanism of getting a sharper image. If we do that, the monotone image with threshold equal to 120 becomes like this. The right hand side image is a thresholded monotone. Two things are noticeable.  Consequently, the ridges and the valleys which we could briefly identify here are very prominently visible here. This is regarded as a much better digital image to handle in the context of fingerprint analysis. Is the threshold 180 correct? Well, we do not know. It depends upon the average pixel value here. So what I have done is I have written a program to calculate the average pixel value here and use that as a threshold consequently getting this image. You will all agree that this image is still much sharper. All that we are going to see today is to write a C program to get a fingerprint image in XPM format. Read that image, calculate the histogram, find out the average value and using that average value as a threshold, create another XPM file which is actually a binary file which is 015. And as demonstrated here, let us look at these three successive figures one after another. This first one uses 128 as an arbitrary threshold. This is the second one and this is the third one which actually uses the average pixel value. Is this the complete thing about fingerprint analysis? By no means. This is just the beginning. Please notice that the fingerprint that you now see while the minutiae and other things and the ridges etc may be slightly more prominently observable, we are not going to use human beings to analyze these images. The pattern recognition etc whatever, we hope to do it automatically using digital computers. Consequently, there are subsequent steps that are required to analyze this image automatically further. For the purposes of this workshop, we are going to limit ourselves to construction of a C program which does the limited task that I mentioned. Namely, read a grayscale fingerprint image, convert it into internal digital values of whatever m by n pixels depending upon width and height, then calculate the histogram, find out the average and use thresholding to get a sharper image. The subsequent steps by the way would be to isolate these ridges very clearly. You can see that these are thick ridges. The black is very thick here. What it means is there are several ones in adjacent rows and columns. That is why you have this thick line. The patterns which we wish to locate on a fingerprint, which we would later on wish to compare with other fingerprints, these patterns called minutiae, arches, whatever, whatever. There are n number and there is a huge amount of literature. In fact, you can again go to Wikipedia and look at digital fingerprint analysis. You will get many more interesting details or that would require image thinning for example. So, you replace all neighboring ones which appear in a bunch by one line of consecutive bunch. So, you are thinning that thing. Once you are thin lines, you can actually use directional pattern extraction or you can do identification of minutiae and their coordinates and so on. It is an extremely complex, very rich research area. We will leave that for those who are interested to read it up either through image processing books or through even popular sites like Wikipedia. Here is another captured image. Again you can see this is a grayscale image and this is its monotone version. I hope you will agree that the clarity is far superior when you convert it in this fashion. So, now we will quickly go through a program which converts a grayscale image to monotone. First, let us recapitulate the algorithm that we are going to use. We know the XPM format. So, we will use that XPM format knowledge to read the data from an image file containing a fingerprint data into our computer's memory. We will declare an image appropriately as an array which has the total number of pixels equal to width and height. The width and height information we are going to collect out of the same file anyway. Here are some comments which indicate that first I wrote this program for my CS11 course. This was written in C++ by the way. I have rewritten it in C for the IST workshop. Please note the last line copyright under creative commons. The creative commons license which we use says that this program can be distributed happily, can be dissected, can be modified as long as the copyright is retained in your program. I have included stdio.h and string.h as two header files which are required to handle this problem. Here is a host of variables and arrays that I have defined. I will describe a few important variables and structures and arrays. Unsigned char star image. So, I have defining a pointer which I am incidentally calling image but this pointer points to a character kind of entity. Now it is very obvious that the word image will mean that it will be storing one of the two images either the grayscale image or the input image and clearly the image will mean a large number of bytes. What am I doing here? I am merely declaring a character type pointer which is called image. I have another pointer which is referring to mono image. So, obviously I imply that this image will somehow be equal to the full flesh grayscale image and the second one will be containing the monotone image that I will generate out of my logic. But wait the image is supposed to be a large array preferably a two dimensional array. Here I am declaring only two pointers. This is where you will recall our discussion on dynamic memory allocation. Please note that individual pictures, digital pictures even in XPM format that I would like to analyze using this kind of program could have greatly varying heights and width. I do not therefore wish to define a fixed size array to hold my images. What if tomorrow I get an image which is slightly larger or what if I consistently get images which are just one tenth the size that I allocate and most of the memory goes free. That is why I will use dynamic memory allocation to associate memory with each one of these image and mono image respective. Then I have unsigned in n-width, n-height, n-colors, num, care per symbol. Notice that these are nothing but the values that you will appear in the second line of your XPM file. There I have defined simple variables such as C H C H 1 C H 2 unsigned int is defined as a value. Unsigned int will mean that the value can be between 0 to 255 and I specifically define a variable called v0 to mean 0 value and v255 to mean 255 value. Why do I do that? Because I know ultimately in my monochrome image the only values which should be visible are 0 and 255. Of course because my final file is going to be in XPM format the values will not be visible as 0 and 255 but they will be visible at some color code that we shall decide. I have some of columns, average, some of rows, etc, etc. Obviously I use them to calculate the statistical pattern of the image values in pixels. I have long int, hist which stands for histogram as we have seen earlier it has 256 elements and then we have pass to represent position, average, some whatever whatever you have these are various indices. Care, file line string 2000. I am defining a very large array of characters to represent a string which will come out of a single line in the file. That is why arbitrarily I have named this array to be file line string. I do expect a line to be very large. Note that this is not a simple text line that you usually see in your books or screens which is less than 80 bytes long. This is actually a string which will hold the complete set of pixels for one row of that image and if a pixel is represented by two characters then I will have twice as many entries into this array. Consequently this size has been arbitrarily defined as 2000 elements. Then I have variables or arrays again character arrays which will define a file name. The file name s simply means that the file name string is what is represented by a 20 character array. Then I have a mono file name which I have simply defined as m minus. So why I am doing that? I am actually going to construct the file name of my final file using mono file name and whatever file name user has given. So effectively if I call the original file as person1.xpm where person1 is the name of the file. Then what I will produce using this program will be called m dash person1.xpm. This m standing for monotone. This is an interesting technique and often resorted to namely that the file name itself is considered to be a very meaningful information and once you have a new file generated out of an existing file in a different format you tend to retain the name of that file as it was and either add a prefix or a suffix to that. In this particular case I am adding a well known prefix m dash. Well known meaning well easily understood and easily remembered prefix. So all the monotone files will be m dash something at the end of my program. Here are some more comments. First files are assumed to be in dot xpm format for gray scale image. The color palette is chosen arbitrary. Why I have chosen arbitrary is the color palette because if I have certain logic in my color palette then I do not even have to read the entire color palette. I know by that logic that what two characters will represent what color. For example I have given here in comments that my color palette is defined as we are having keeping capital in the first position a a a b a c etcetera then b a b b c etcetera. First character changes after every 25 symbols. Second character a b c d f g h up to y then again it is repeated and so on. You will soon see the reason for doing this simplistic codification because given any two characters when we read those two characters for a particular pixel in the image you can calculate the corresponding numerical value without ever referring to the color code. Ordinarily you will have to store all the color codes of an xpm file into an internal array and whenever you get a pixel value represented by some two characters you will have to compare these two characters with the entire color code array. Here because the simplistic choice I can actually do a numeric mapping very easily. Second for the output file I decide that I have a monotone image I have only two colors. So I will represent white by dot and black by x something that we saw very briefly in the representation of a dot image that we saw. So generating and representing a monotone image is far simpler. I have only two colors each coded by x and zero and obviously one of them will be all zeros and the others will be all f's. Let us very quickly go through the logic. First we get a file name for input fingerprint image we assume dot xpm extension.  Now I have five star image in file one and star image out file one. I am going to need two files in my program. One file is an input file which will be connected to the input image that I get in grayscale. The other file which will be connected to any physical external file which will be called image out file. This is going to be my monotonous image. What do I do here? Given a file name I open that file. We have seen that yesterday in the file operations that when I give this as the string name string then a file with that name should exist in the directory in which you are executing this program or means I am opening it for reading. Observe the syntax. I say image file one is equal to f open this, this, this. If the file actually exists which means I have not made a mistake in typing the name or something then that file will be available for further reading and so on. However if the image in file one is not equal to null then and only then I proceed further. Why this null? Well a null pointer indicates some sort of problem in the operations. In this particular case if a file pointer ever becomes null that means it is unable to find the file locate the file or hold the file or whatever. In such situation I say the image file is found and opened. Now I have to read the image file. What am I reading? I am actually reading an xpm format which means the first three lines are well just commands except one which contains the value. The most important information, width of image, height of image, the number of colors that the image has in this case they will be of course 256 and the number of characters that I used to represent each color. In this case I should actually be reading this data from the image file but I have myself created that file in the first place and therefore I know which two characters will represent which color in my image. When I say color I mean that gray scale shape. So here is what I do if image in file has opened properly then I give a message that I have found and opened the file then I skip the first three lines. Why? First three lines contain first a command with xpm written inside, second where some problem whatever the information that you had and the third one is again another command. So I just skip these lines I get from image file one I get a string. Notice that I am using f get s. f get s will get me a string from the designated file pointer which is written at the last column. How many characters should it read? Ordinarily this f get s will read as many characters as appear before the end of line symbol because it is still regarded as a text file. However if there is no end of line or new line character and you really have a large record this f get s will read as many as 1999 bytes at most and it will automatically insert a backslash zero in the remaining string. However this is simpler than what it appears to be. So in this way we have actually got a name for a file which stores the xpm photographs. Next line is height, width, number of pixels etc. So I again get a string. I can read these four values directly by the way from that line because we know how to read 3, 4, 5 values from input. The trouble is that ordinarily when I ask for three values you will be giving me three values separated by black. But here the situation is slightly different in the sense that I am using an f get s thing to get the string from an image file and from that string I will interpret the value of height, width and number of pixels. So what am I doing? This string does not contain just four numerical values. Let us go back a bit and just examine what this string would contain. Look at this string. This string has double apostrophe, one value blank, another value blank, third value blank, fourth value and a double apostrophe. Now if such a line is fed as an input line from my keyboard my scan a function etc. will be unable to extract very very important information such as this has 352 columns, 544 rows. Each pixel has 256 values and each pixel is reprinted by two characters. I may miss giving you this information and therefore instead of reading this string directly from a file I read this entire thing into a separate string then I personally take care of removing this opening double quote and possibly the last double quote and then whatever pure values remain I will read them as if I am reading them from file. Please remember we explained it yesterday I think. Get S will get you a string from standard input STD in. F get S will get you a string from a file which has been named and opened and in this particular case by getting the string separating out this double quote appears to be a far easy mechanism of processing this file. So let us quickly go over to the program which we left halfway through. So this is of course the coning scheme and so on and this is the program. I have skipped the first three lines here now I read height, width and number of pixels from the next line. So I get a character string first. Now I scan the character string from 0th position. This line obviously is bound to have two double apostrophes. Fun as the starting point and one at the end point. I have a very simple job. Go through every character of this string. The moment you find a character which is double apostrophe stop there. After that are going to be your values, width, height, num color and num care. This is exactly the logic that has been implemented here. All that I do is I start with I equal to 0 and while I is not equal to apostrophe. I am now looking for the second apostrophe. I will keep transferring characters one by one from whatever I have read into the department of CAC characters. So I have two position counters L pass and S pass. And I use these L pass and S pass to pass over the indices which are relevant here to capture the value. So I say while line I not equal to double apostrophe simply keep incrementing I. I will find someone where some character which suddenly is this apostrophe. The moment I have detected this double apostrophe double quote I know that my actual values will start flowing in from it. So I start assembling string byte by byte from the first occurrence of this double quote mark to the last occurrence preferably and store that somewhere else. What am I doing? In the second array I transfer characters from line to S. Line is what I have got. S is what I wish to create. Once I complete this my job is actually over. I will transfer these characters S pass equal to 0 line of S pass equal to double quote S pass plus plus L pass plus plus. You can verify that this code works correctly without any problem. And finally when all characters are pushed into S. Now S may have 15 characters, 20 characters, 30 characters but it will not be regarded as a string unless it is terminated by a backslash gene. So after reading as many characters from the string that you want till you get this double quote from this point onwards you start pushing L pass character into S pass character and you keep updating these numbers till such time that you get the second double quote which is at the end of the file. At which point you set backslash 0 as the contents of that particular place. Consequently you have a proper string even in your S. Notice the use of S scan F. As I mentioned to you earlier scan F is a family a function of a family which reads data from your keyboard. If I say F scan F I will be reading data from a named file for which I will have to provide a file pointer. When I say S scan F I am doing neither. S scan F will read data from a string and that string itself is designated as part of the S scan F instruction that you will see here. What it has is width, height, number of colors and num care. JPG and JPEG are same or not is a question from SJCITS. Yes, they are same. There is no difference. It is just a different file extension that you use. Thank you. We will meet after the break.


In this study, researchers found that laparoscopic gastrectomy had a better long-term prognosis than open surgery for patients with primary T3 or more advanced gastric cancer. Laparoscopic gastrectomy was associated with improved overall survival when compared to open surgery. Additionally, the study identified open surgery as an independent poor prognostic factor for overall survival.