Good morning and welcome back to the continuation of this session. Since I have some slides which will describe the workshop project activities, I will with your permission go through this algorithm rather quickly and we will discuss a few details about the activities both in the remaining two days today and tomorrow and later when you go back there. There are some questions from Nirmah Amdabad. What is the significance of FSB? I am not sure I know what it is. Sorry Nirmah Amdabad is saying what is 100 into 100 pixel image size in inches? Well a pixel is not the question is what is the 100 by 100 pixel size in inches? There is no direct relationship of a pixel to a physical measure like inch or centimeter. In fact this connection is established by the resolution of the sensor that you use to scan the image. You will recall most of you would have used ordinary scanners for example to scan photographs. When you scan photographs you are required to set a resolution and that resolution is typically set in terms of pixels per inch. So 200 ppi, 600 ppi etc. are the resolution that you are able to set. When you set this resolution then that relates inches to pixels. So I repeat ordinarily if you are just given so many pixels by so many pixels in image you can have absolutely no clue as to what was the original physical size of the image from which the digitized image was obtained. That depends upon the resolution of the scanner or the scanning equipment. Typically for what you call fingerprint images when you get 320 by 500 kind of pixels this would roughly be a three fourth inch by one inch or one inch by one inch kind of thing. So it is a fairly high resolution scanner for fingerprints. Ordinary paper scanners can also go out to very high resolutions but usually you use 600 dpi or 200 dpi as adequate scanning speed. Dpi stands for dots per inch and dot is nothing but a pixel. So I repeat the relationship between pixels and inches is given by the resolution of the scanner in terms of dots per inches. So I would like to go to the previous slide here. After having read the values of width, height, num color and num care observe that we are using a scan f as I mentioned here. I simply print it. Then why I am doing this? Well the reason is very simple. These assignment statements have no real purpose by the way. I could have continued to use width, height, num color and num care as I have used to read these values. It so happened that these scanner statements I introduced later but for the rest of the algorithm I was using n width, n height etc. And therefore I just quickly put these assignment statements to get values in the right variables which are used in the subsequent part of the algorithm. Needless to add as I have commented at the beginning of the program this was originally a C++ program. Last night I converted into C. In fact I completed the conversion only about 7.30 in the morning. So the third consecutive night that I was working and obviously there are some errors as I will show you later. But let us go ahead with the algorithm then. The most important part comes here. I allocate memory to grayscale and mono images. And how do I allocate memory? I use the dynamic memory allocation using malloc or malloc. How much memory I need to allocate? Please note that image was defined as a pointer and mono image was defined as another pointer. These were character pointers. Now when you use malloc to allocate memory chunk which you collect from operating system, malloc returns a pointer which is of the type void. That means it does not point to any specific data type.  So you say unsigned care star at the beginning. That means whatever pointer is written by malloc it is cast as unsigned care star. That is typically the type of pointer that you use for reprinting image. Now how much memory you want to allocate? We said n-width into n-height. N-width into n-height is a number. But that number reprints what? Reprints the number of pixels and each pixel is one character long. So we say care n-width star n-height. So I am declaring a care array kind of thing and size of this you notice the size of function. This way tell me the exact number of bytes which will be allocated by malloc. So consequently using this malloc I dynamically allocate memory to hold an image and I also similarly allocate memory to hold mono image. Please note that mono image because it contains only 0 and 1 can be further compressed. I am not doing that. I am still using one full byte to represent either 0 or 1. This is slightly wasteful of memory but it makes eminent sense because the logic of my algorithm remains clean and simple. Now what I am doing is simply going through the lines of the xpm file. You recall the format that we had and one by one extract information. I skip one line and next n colors line. Why? Because I do not require to read the color palette since the scheme is well known to me. I get a line string. This is the actual pixel string. This is i equal to 0 to less than equal to n colors. So this is the number of colors that means color code I have. I simply skip over these. Now I read image pixel values line by line. What do I do when I read the image pixels? Each line has n width into two characters because each pixel is represented by two ASCII character code. This is surrounded by double code. Some pixel values double code. So for j equal to 0 to n width j plus plus I set position as i into n width plus j and I keep getting characters. There are two characters for each pixel. I get first character into ch1, second character into ch2. Once I do that I will convert these two characters together into a value. Notice that ch1 and ch2 are characters and special characters. The first character is capital A for first 25 colors then capital B then capital C. The second character is small a b c d a etc etc. Now this is a very neat formula which will convert that particular character code into a numerical value for the color. I will leave it to you to verify that this indeed converts into the appropriate color. ch1 minus capital A. So if the first character of the pixel is capital A then this will be 0. So this into 25 will remain 0 and only ch2 minus a will add some value to it. Imagine if any pixel is capital A small a then both will be 0 and value will be 0 and indeed capital A small a represents hexadecimal 0 0 0 0 to us. So you will notice that colors will be correctly decoded using this simple formula. This is the advantage of using an artificial coding scheme. Ordinarily however when I interpret an xpm file I will be actually reading all the color codes storing them in an array and whenever I read a pixel I will see what code that is search for it in that array string and then read the corresponding color value because the color values will also ordinarily for jpeg files will not move linearly as they conveniently do here. And finally after having got the value this value will be an integer value. I convert it into an unsigned care by casting it and then assign it to the position th place of the image. The position itself is calculated as I into n width plus j which will convert a two dimensional matrix position into a linear position pass. When I run through this I would have read the entire image into the array called image. After this I can close the image in file because I have read that image. Now I proceed I have to calculate the average pixel value this simple arithmetic after this when I finish this I will calculate the sum of columns sum of totals etcetera and finally I get the average. The reason why I am calculating this average is that based on this average I will have to threshold an image while outputting it to the new file. I just print the average pixel value and I now convert the image to a monotone image. Observe that all that I have to do is any value less than average is said to 0 any value greater than average is said to 255. So for j equal to 0 to n height less than I mean n height minus 1 and for j equal to 0 to j equal to n width minus 1 that means each pixel in the new image I calculate what the position is all that I have to do is take the position of the original image and replace it by a proper value based on this thresholding. So what is the value? Value first of all I get from the original image file sorry original image array at the process position I get it into a value and a simple comparison if value is less than average then the mono image value at that position will be v 0 which is 0 otherwise if the value will be v 255 which is defined as 255. So this is how I am converting an image into a black and white image. Then I simply go and write the mono image to an xpm file please observe that the previous statement let us go to the previous slide these loops completely fill up the new image which is the mono image in all possible pixel positions with 0s and 1s and all that I do now is for the benefit of creating a disk file which can later on be seen on the screen using any one of the utilities and tools that I mentioned I now write the mono image file to an xpm file format. All these statements we merely write check a value and write the corresponding code for it. So this for example it writes the first three lines which are the standard lines then it will write line containing image header information and after that I will be writing two colors these are the color codes for this new xpm file x which stands for 0 and dot which stands for ff. So I am actually outputting the character sequence in the right manner and finally for i equal to 0 up to n i minus 1 I will print an out file which will contain these double code then for each picture row it will compose the remainder of the line. So it will get a pixel value first it will calculate the position based on i and j then it will take the value from mono image pass which we know is either 0 or 1 and it will convert it into unsigned int as a value. If value is 0 I set the character to x if value is non-zero which means it is 1 I will set the character to dot. So it is as simple as that it is a single character code and I will just put it on to the file. Yes there is a question from ASC please do not worry I am going to spend time on the question bank quiz activity let me just complete this particular discussion we are just nearing the end of it. Finally I will push the closing codes and the new line character and that is the end of the code to print the xpm file of mono tone fingerprint. Why did I discuss this longish program? First of all to emphasize that any meaningful activity will require fairly large programs to be written. This generally will not be a program that we can ask our students to write during a conventional examination where typically for one question they have on an average half an hour. This program cannot be written in half an hour. This program in fact may take 2 or 3 days of careful thinking planning and testing. In spite of having spent about 4 hours last night after having written the correct program much earlier several months ago I still have a problem with this program. Just to demonstrate what kind of problems you may face after I wrote this program and removed the initial bugs the results of the original mono convert dot cpp were like this. This was one sample image and when I applied mono convert program to it I got this image. I used the same image as input to this c program. Note that I have converted c++ program into a c program and look at what I got. This is the image I have got. While it may look very similar to this clearly this is not the correct representation of this image even when you convert it to mono tone. The correct representation is shown in the previous slide. Obviously there is an error and a program which is not a very long program may be about 120-150 lines but I will tell you that it will take no less than one one and half hour for me to debug this program. Unfortunately real life programming requires this kind of effort and that is the reason why I said a programming project done by a group of students is likely to teach our students far more valuable things about actual programming than the conventional question answers do. Projects cannot replace the conventional question answers by the way and that is the reason why we are trying to stress creation of a question bank which will also be meaningful for our students. So what I am suggesting as a good teaching strategy is to continue the conventional mechanism of conducting quizzes and conducting written test but but trace it with a good project which will expose students preferably in groups to do larger activities. With this now I will move over to a brief discussion of workshop activities. First of all during the workshop we have exactly two days left today and tomorrow. While I have seen some more assignments being uploaded on the Moodle I still do not have all submissions made by all participants. Last night I asked my colleagues to tally the Moodle uploads. Very sadly some people have uploaded the original assignment itself on the Moodle. That was sad because it was not necessary at all. The original assignment was known to you known to us. So there is no point in uploading that assignment as it is. What is expected on Moodle is the solution that you provide. Since today is practically the last day of the lab instead of giving an additional lab assignment I insist that all of you should finish completing all the assignments that you have to do in the past and complete them and upload the tar files of the solutions that you have prepared. Not the original problem. If you have put an original problem back again as an uploaded thing on your Moodle maybe for just practicing how to upload it on Moodle please remove that particular document because it has no value neither to you nor to us. So once again I will repeat please ensure whatever time you need to take today complete all the assignments and submit the appropriate tar files for different assignments containing your solutions. Please do not repeat the questions which were asked originally and resubmit them as tar files. I think we all must follow this discipline absolutely rigorously. The second thing during the workshop you are required to form teams and register these with IITB as also with your remote center. I am glad that many of you have done that although not all have done that yet. That is sad because when we ask ourselves to submit to a deadline we must learn to do it if we do not we cannot expect our students to do that. Second suggestion what only at few centers I find that there has been a fairly intelligent behavior of participants where they have formed the teams and they have sent one document describing the membership of different teams. But in many centers individual teams are reporting the team constitution. Please understand that at a central coordinating place if individual teams keep reporting individual components and that too in emails which perhaps do not have a fixed or pre-arranged or pre-agreed subject it becomes extremely difficult for the workshop support team to coalesce these different teams. In some cases we do not even know from which center the teams have submitted their team organization. My humble submission is even if you have sent these reports earlier unless you have sent a consolidated report of all the teams constituted at a remote center we will regard that as the final constitution. But if you have been sending individual team constitutions kindly go back and today afternoon in your center with the help of your central coordinator prepare a single consolidated list for that center. So some centers may have two teams some centers may have five teams some centers may have 20 teams but all of these should please ensure that they come as a single document to us from every center. So to repeat my request we have 22 centers and each center we should get one document it should come as an email to us and it should be uploaded on the model preferably by the center coordinator so that we know that this center this is exactly is the composition of the team. What is the max team size can it go up to 10 most certainly not if you are 10 people please form at least two teams. What I had stipulated right at the beginning was that ordinarily a team should comprise of four persons out of those four one should become a team leader although the team leader does not mean much the team leader is like first amongst equal and all the four members are supposed to work together on the workshop project activity. However in some cases where it is not possible to have teams of four I had said rather reluctantly that you can have teams of five or six but some teams can be of that size preferably no team should be less than four unless it is absolutely mandated and no team should be greater than five unless it is absolutely a must a team size of 10 clearly means that you have potential to form two teams and therefore two teams must be formed see her technology how to remove it from model interesting question well if you can't remove it from model just to ensure that the name of the tar file that you submit indicates to us which one is the latest so far you have not been putting in any date or time stamp as part of the name of the tar file one simple suggestion is all files that you submit today they may have any other name or identification but as part of the name if you just include 23 d e c 0 9 as the name of that tar file itself then automatically we will know that this is the latest submission that you have made and we will consider that to be overriding other previous submissions unless this includes only new submission there is a question regarding how many questions etcetera to be submitted I will get back to you in a small in a short while in the next slide so during the workshop to recapitulate between today and tomorrow you are required to complete the following activities form teams and register these with IITB and your center identify and confirm the topics on which you will set the quiz questions and answers I will shortly tell you how to do that identify the model exam questions your team will work on obviously you cannot write the question but you may develop a rough idea of what kind of questions you would like to compose similarly identify the programming project your team will work on these are the quiz topics that I have listed data values variable names simple expressions such as order of preference type conversion its precedence etcetera conditional execution with an LC ladder and you may also include other parts of the conditional other components of conditional execution such as question mark operator switch operator switch is explicitly stated here while iteration do while iteration for iteration pointers formatted I O then these are combinations use of conditional within iteration iteration within a conditional all of these topics basically mean a lot of quiz questions for people for our students to understand and analyze code segments which contain these combinations and to understand the logic proper strings and character arrays conversion between strings and character arrays function definitions prototypes function invocation by value or by reference structures file I O whether text files or binary files random access files these topics exhaustive by doping they are not exhaustive but they are fairly representative topics okay how many sets of questions to be done so let me elaborate the process first yes there is a question from seagull technology pro project topic must be of first level students are advanced level students I will come back to that please please bear with me for a minute so first let us conclude the discussion on quiz topics first as I said these are not exhaustive topics but these are representative topics if teams at a particular center who look at these topics and I request all the teams to look at these topics today during the afternoon lab and even later if necessary during dinner or whatever and if you come to a conclusion that additional topics can be put together by no means this prevents you from doing that how do we distribute topics across centers because at each center we do not have plenty teams if we had then I would have requested that distribute the topics within the center two different teams so as a result what I have decided is as follows this is being shown to you in terms of your activity tomorrow remember there is a presentation slot with over 650 people no individual presentations of any consequence are possible at all because we will take 2 to 3 full days to make a reasonable presentation by any individual last thing say 2 to 5 minutes that is not possible however it is absolutely vital in my opinion that each one of the colleague teachers is seen and heard by everybody else because after all what we are doing is we are setting up a large collaborative framework in which when we are working together for as long a period as 10 days everybody should try and see the other person remember that person's face remember that person's name or at least hear it at least once see that person speaking at least once you may consider this to be a sort of childish kind of wish but believe it is not childish after all I do believe that there is a huge strength in teamwork and we represent a team of 650 people it is absolutely mandatory that if we are going to work together over the next one year to take our subject portal to great heights then it is mandatory that we establish as much of a personal rapport as possible so I am considering these presentations as a beginning of that activity what am I proposing here each team will introduce themselves means team members to the entire group entire group means all 650 people so tomorrow I propose to go one by one over to different centers I will choose centers arbitrarily when I go over to a center the teams there should typically be sitting in close vicinity of each other and not distributed the team leader will mention the name of the topics chosen for the quiz questions I expect every team to choose at least two topics and set at least one question on each you can of course surpass this but this is the minimal that is required from at least what you may call not really legal but from a point of view of the agreement with IST for certification of course you are most welcome to contribute more on more topics but each team must contribute two quiz questions each for each quiz question there should be the question possible multiple answers or if there is a short answer short answer and explanation of why some questions some answers are wrong and why this particular answer is correct that is what is expected out of this similarly briefly mentioned the exam problem that you are going to concentrate on Viennate is asking me whether only one topic is selected or group of topics is selected that is making life complicated I will repeat again I have given a list of about 20 21 topics which appear to me to be representative of different components of the syllabus around which you teach the course by all means exceed these names if you can think of additional topic names there is no problem on that but please do not take too many topics for which you may not be able to do justice if you feel you can you can choose as many topics as you want personally I will be delighted if there is something which takes up five topics and suggest two questions quiz questions on each one of them resulting in a submission of 10 questions that will be great however what I have stipulated here is the minimum work that is expected from every team similarly the minimum work that is expected from every team is an examination problem that you will have to decide on the examination problem may require further deliberation it is perfectly all right if the team leader says that we have not yet decided what should be the nature of our exam problem I will only submit the following when you set up an exam problem and set up its model solution please keep in mind that this problem and the solution has to be attemptable and solvable by our students when you teach them this course because this question bank we want to be represented consequently for each question not only you will submit a model solution you should also submit two or three alternative solutions which you believe your students might attempt these will be wrong solutions or these will be incomplete solutions but they add immense value to the question bank because they should be written as if the students are developing the program in a limited period of time such as 20 minutes or half an hour also along with every question both for the quiz and for the exam question please indicate the level of difficulty so you can make it simple medium or complex you should describe these in one of these three flags for every question additionally for the exam question you must also figure out what would be the approximate time that you believe students should be given to solve that problem in an exam other than that you are please feel free to choose either any additional activity or any other topic that I mentioned in a nutshell then the presentations tomorrow will essentially be introduction of teams to all the members who are participating in this workshop and this introduction will comprise of just 15 seconds by each participant what can you do in 15 seconds you can tell your name you can tell the institute that you come from that's all and this should be done one by one with all the team members at the end the team leader should mention the name of the topics chosen for the quiz questions if you have chosen more topics mention all of them at least two are mandated and in case you have already discussed by today evening the kind of exam problem that you can solve the team leader can also mention that please note however that sharp at two minutes the entire time for the team will be over and I will be forced to request you to handle the mic to the next team because unless we do that we will not be able to properly listen to every participant who is participating in this workshop about the schedule there is no schedule because I expect every teacher participating in this workshop to be physically present throughout these presentations and please do very carefully look at your other colleagues at other centers try to remember their names and faces because we will all be working together in coming year activities after the workshop I had already stipulated this briefly I am now casting it in concrete the team to make question answer submission on or before 15 January 2010 there should be exactly one submission from the team but the team leader should certify that all team members have participated in framing that question this participation should be visible as I said for the quiz question there could be only quiz question and explanation for right or wrong answers similarly for exam questions I will expect at least two alternate attempts to be provided for every attempt made by any individual should be so documented as part of that attempt needless to say any documentation that you send about question correct answer model answer sort of efforts etc etc should all be put together in a single document and it should be submitted on or before 15 January this should be submitted both on the course model and this should be uploaded by the team leader or by email and by email to the central coordinator both your central coordinator and IIT Bombay need to have access to this document I repeat again this document cannot be a document which is written entirely by one person whether it is team leader or any one member all team members must contribute practically equally and their contributions must be visible to us for us to be able to certify that is what has been mandated by IST because we have put these two weeks of additional work as a part of the IST workshop upon satisfactory completion of this activity certificates will be sent to the participants what we are going to do is we are printing these certificates here with the logos of IIT Bombay and the logos of respective coordinating institutions after I sign these certificates they will go to the coordinating centers where the coordinators will sign those certificates and the IST certificates signed by both of us will then be dispatched after 15 January for those who satisfactorily complete this activity further the teams have to submit the programming projects before 15th March 2010 since there is no time now for people to either discuss these projects I suggest that teams should continue this discussion through email or any other means through physical meetings etc in this subsequent 15 to 20 days but first all of you should complete this part of the assignment and the programming projects are to be submitted before 15th March 2010 these programming projects what should be the complexity of these programming projects my submission is that these projects should be such that teams of students at your college should be able to do them in roughly half a semester time that is exactly how IITs conduct their subject projects and that is what I would expect you also to do so therefore the project should not be large open-ended research problem for example although to make projects exciting you may give them a tint of some real world problem for example the projects done by IIT first-year students last year all revolved around the fingerprint analysis and use of fingerprint in unique identification but there we had formed very large teams teams of 20 people but each of these 20 people groups were divided into 5 teams in case some of your teams wish to work together so instead of 10 people team that was suggested if you have 2 teams and for the project these 2 teams want to work together I have absolutely no problem however the only stipulation is that whatever the project that is submitted the contribution of each individual team should be very clearly identifiable and visible and as I said earlier while we tag the submission on 15th January to the certification process which we will complete as quickly as possible after 15th January but since project is going to be done over a longer period of time we are going to associate prizes in the form of honorarium to be awarded to the best entries and to the center coordinators of course the number of prizes etc. etc. will depend upon how many teams continue to work towards these projects enthusiastically and how many submissions we finally get we will decide on the number of prizes based on the total number of submissions that we get on 15th March it is my personal wish and dream that all the teams which have participated in this workshop and which will submit these things continue to work on this with less or more emphasis depending upon the time that is available at their disposal and turn in extremely good projects of which all of us will be proud because all of us our names will be there on those projects when they go on to the portal and if lakhs of students and other colleague teachers are going to benefit from this it will be a great pleasure last but not the least before I conclude I would like to mention that sorry there is a question what is the date for sending the project abstract project abstract need not be sent if a team wishes to send a project abstract for consultation please do so with your center coordinators at couple of places I found out that some center coordinators are so enthusiastic that they would also like to participate in the project activity they are most welcome to do so either they can form a team of themselves or they can form a team with some of the participants and they should go ahead and submit a project the only problem is that when the projects are to be evaluated by the centers for sort of ranking and if they themselves are participating then kindly get such evaluation done by some other colleagues of yours in your center where it will be unfair for me to be a participant as well as certified but other than that more the merrier there is absolutely no problem as far as projects are concerned I repeat there is no need to submit a project proposal although you are most welcome to submit it but we will not give any credence to that submission we may not at IIT Bombay be available to give you any advice on whether the project proposal is right wrong or whatever these decisions have to be taken by respective teams we believe that five people all of whom are teachers with a team leader are competent enough to judge and the judgment should be based on not what you would like to do or what you believe IIT Bombay would like to see but what you and I think would benefit most our students please remember we are not doing these projects we are not doing these quizzes to demonstrate our own prowess that is well established either I know programming or I don't know programming but as a teacher I have learned something in this workshop and I keep improving upon it so obviously my knowledge will become better but I am not interested in seeing how much knowledge benefit I have got I am interested in seeing how much benefit my students will get when I deploy this knowledge and therefore all activities that we do should always be considered from the point of view of impact making on our students and on the general educational process believe me when we do that we ourselves improve tremendously automatically we ourselves benefit just before the conclusion last but not the least most important point in fact a feedback form is being uploaded it is mandatory that the feedback is supplied to us the feedback has certain questions and you are required to answer those questions I think in three or five categories bad satisfactory good or whatever I don't know I have not yet seen that please make sure that the feedback form is submitted this feedback form is to be submitted online and most rarely this will be activated on the model without the feedback form it will be impossible for us to judge the effectiveness of this workshop itself secondly you may have certain additional opinion to share about the workshop which is not included in the questions that are explicitly asked in the feedback form by all means please feel free to add additional comments there will be adequate space left on the electronic feedback form that after answering the questions which have been asked you can write as lengthy a comment as you wish to write particularly if you make a comment which will make future efforts of these kind of workshops better I will be personally grateful how many programming projects can each team send at the most sir my god I was hoping that each team will send one project please note that the project does not mean only project description you have to actually complete the project as if you are students completing the project so you have to follow the entire rigmoral of maintaining a project diary maintaining the project progress writing some documentation writing programs testing them and preparing the final report if you can do more than one you are most welcome in fact let me announce because we have some prizes associated with these projects if a team submits more than one project each project will be considered an independent entry from the same team and will be considered for evaluation for the ranking purposes I hope that satisfies your query thank you so much I will meet you tomorrow now.