A very good evening aspirants, welcome to the Hindu newspaper analysis brought to you by Shankar IA's Academy for the date 20th of July 2022. Displayed here at the list of news articles that we have chosen for today's discussion. In this discussion, the first news article that we are going to discuss is very much relevant for your upcoming means examination. Also I had made a point to discuss the other articles in both preliminary as well as main's perspective. Now, without wasting much time, let's get into the first news article discussion. Look at this op-ed article, see recently the Union Ministry of Health published a new draft bill to replace the Drugs and Cosmetics Act 1940. As the drugs and cosmetic act 1940 is a pre-independent era act, our government has decided to replace it and this is to accommodate the changing times. This article highlights the issues with the recently published draft bill. So in this discussion, we'll first see the provisions of the drugs and cosmetics act 1940, then we'll see some provisions of the new draft bill and finally we'll see the issues with the draft bill that the author of this article has highlighted. Before getting into the discussion, I have highlighted the syllabus regarding this discussion and you can go through it. Now let us start our discussion. First, let us take a look at major provisions of the drugs and cosmetics act 1940. See the drugs and cosmetics act 1940 was mainly enacted to regulate the import, manufacture and distribution of drugs in India. The act tries to or aims to ensure that the drugs and cosmetics sold in India are safe, effective and conform to the state quality standards. Here we must also know about the drugs and cosmetic rules 1945 also. The drugs and cosmetic rules 1945 are the set of rules under the drugs and cosmetics act 1940. See we might have heard a doctor say that a particular medicine is a scheduled medicine, right? This drugs and cosmetic rules 1945 is the one that gives you provision for the classification of the various drugs into different schedules. In addition to this, it also contains various guidelines for storage, sale, display and prescription of drugs of various schedules. For example, Paracetamol is sold over the counter whereas Benzor Discipline is not sold over the counter. This classification is made by the drugs and cosmetic rules 1945. Okay while we are here we must also know about two bodies. First one is the drugs technical advisory body. The drugs technical advisory body is a statutory body. It is constituted under the drugs and cosmetics act 1940. The main function of this body is to provide expert advice to the central and state government on the technical matters related to drugs and cosmetics. Okay the second one is the central drug standard control organization. See it is the National Drugs Regulatory Authority of India. The drugs and cosmetic act 1940 and the drugs and cosmetic rules 1945 has various provisions, right? These provisions are implemented by the central drug standard control organization. Okay see it is under the control of the union health ministry and its function mainly includes regulation of import of drugs, setting standards for drugs and to decide whether new drugs have adequate clinical evidence before they can be sold. Okay this is headed by the drug controller general of India. And when you take on the state level there are state drug controllers. One in each state and union territory. The functions of the state drug controllers include providing license to the drug manufacturers, picking up sample drugs from the market and checking their quality and finally to prosecute the drug manufacturers when the sample drugs are found to be substandard. Okay see this is about the drugs and cosmetics act 1940. Now let us see the major provisions under the recently published new draft drug medical devices in cosmetics bill 2022. The first major provision is that this bill separately defines medical device which was not done in the drugs and cosmetics act 1940. The 1940 act no regulated medical devices is one of the four categories of drugs. In addition to this the new bill creates a separate medical devices technical advisory board in the similar lines of the drugs technical advisory board. Okay see earlier the drugs technical advisory board advises governments in relation to both drugs and medical devices. Okay the new bill proposed that the medical devices technical advisory board will provide advice to the government in regards to medical devices. This medical devices technical advisory board will include medical professionals and also people with technical knowledge of the devices. Okay see currently you know there is a network of central and state testing labs for testing drugs all over India. Likewise the new bill proposes setting up of a network of central and state testing labs for testing medical devices also. The pharma industry in India is growing in a fast phase am I right? Medical devices are a major part of it in order to capture the export market proper standards have to be maintained. Right so this network of testing labs will help ensure global standards in the medical devices. And now the last major provision in the new bill is regards to rules for online pharmacy. There has been an explosion of online pharmacies like netmeds, 1MG, upload into 7 etc etc am I right? So to regulate these the bill proposes that the central government must frame separate rules. This will help provide a common regulatory framework for all online pharmacies all over India. These are some of the major provisions of the recently published new draft drugs medical devices and cosmetics bill 2022. Now having seen this now let us see the issues in the draft bill highlighted by the author in this editorial article. See the author feels that although the bill introduces some provisions regarding medical devices and online pharmacy the bill fails to address the issues in regards to drug regulation that is there is nothing new in this bill regarding drug regulation. This is why the oped article is aptly titled a new legislation that mirrors the old. Now let us see the first issue see presently under the Drugs and Cosmetics Act 1940 for the regulation of the drugs what the drug inspectors do is they pick up random drugs from the market and test its efficiency. If the drug is found not up to the standards the manufacturer of the drug is prosecuted. This method is faulty at its core. See there is a huge room for error am I right? And in this method a lot relies on fate for example if a drug manufacturer makes 80 good tablets and 20 faulty tablets during the random testing the drug inspector happens to pick up one of the 80 good tablets. So in the eyes of the drug inspector there is nothing with the tablet that he has picked so he will not take action against the drug manufacturers right? In this case 20 faulty tablets will still be in the market and will affect the life of the people who consume the faulty ones. This is why world over countries have moved from this method of testing to the GMP method that is good manufacturing practices method. In the GMP method all the drug manufacturers are made to follow good manufacturing practices. So inspections by drug inspectors are done not after the drug is manufactured but while the drug is being manufactured. This kind of inspection will ensure all the drugs leaving the manufacturing standards to be up to these standards right? The drug to build still has not endorsed the GMP method and relies on the old method of inspection for regulation of drugs. This is the first issue highlighted by the author of the editorial. Now moving on to the second issue as we saw while we were discussing the provisions of the drugs in cosmetics act 1940 the central drug standard control organization has a limited role compared to the state drug regulators. The central drug standard control organization only deals with regulation of import of drugs setting standards and ensuring the drugs have gone through proper clinical trials. It is only the state drug regulator that enforces the drug standards and prosecutes the drug manufacturers when they violate these standards. As there are a total of 37 state drug regulators in India one in each state and union territory there is a lot of non-uniformity. For example take Himachal Pradesh it has very lax regulatory standards. In addition to this the Himachal Pradesh government provides tax holidays for drug manufacturers. So a lot of medicine manufacturing in India happens in Himachal but in case of Tamil Nadu which has strict safety standards finds fault with the drug which the manufacturing base is in Himachal Pradesh. It cannot cancel the license of the drug manufacturer because only the Himachal Pradesh government can take action against them. Due to this even those states like Tamil Nadu, Gujarat and Karnataka have higher standards they have to deal with substandard drugs from Himachal Pradesh. To address this in the case of countries like the US the drug standards are common for all the states and it is enforced by a central authority. This kind of mechanism has to be introduced in India by empowering the central drug standard control organization and expanding its role. The draftable is silent on this issue also. This is the second fold in the draftable highlighted by the author. And moving on to the last issue almost all the decisions regarding drugs are decided by unelected bureaucrats and technical experts. Although the decisions of these experts are based on scientific data to ensure accountability transparency must be ensured. See under the present scenario after a decision regarding a drug is made the data based on which the decision was arrived at can be assessed only through the Ride to Information Act 2005. The data is not published to the public by default. The author feels that all clinical test data and the inspection results must be made available to the public by default. See this will ensure accountability right? But the bill is silent on this aspect also. So the draftable fails to make accommodation for public participation in decision making process. So this is the third issue highlighted by the author in this article. All the issues in the draftable highlighted here are in relation to drug regulation. This is why the author feels that the draftable is a copy of the old law and there is nothing new in regards to drug regulation. Okay so that's all about this news article. See this news article is very much important for your upcoming mains examination and also I had made a point to relate something to the preliminary examination also. All the bodies or act can be straight to be put as a preliminary type of question. Okay so if a question comes in mains like critically analyze the new draft drug medical devices and cosmetics bill 2022 you can absolutely use the points that we discussed today. Okay so these key points in mind now let's move on to the next news article discussion. Take a look at this article it says that the former Rajasthan governor filed her nomination papers for the vice presidential elections. This happened yesterday and this is the crux of the news article given here. In this context let us learn about the election of vice president from preliminary perspective. See the manner of election of vice president is given in the article 66 of the Indian constitution. As per article 66 the vice president shall be elected by the members of an electoral college. Now let us see who are all present in this electoral college. See this electoral college consists of the members of both houses of the parliament. So the electoral college consists of both the elected and nominated members of both the houses that is both Lok Sabha and Rajasabha. And the election is held in accordance with the system of proportional representation by means of the single transferable vote. One more thing to note here is that the voting at the election is done by secret ballot. While reading the election of vice president revise the election manner of president also. There is only a minor difference in these two. See for president election the concerned article in the constitution is article 54. As per the article the president shall be elected by the members of an electoral college consisting of the elected members of both the houses of parliament and the elected members of the legislative assemblies of the states. So the electoral college consists of only the elected members from both Lok Sabha and Rajasabha. And only the elected members from the state legislative assemblies. Am I right? And here the elected members from the union territories which have legislative assembly will also be included. See when compared to vice president's election two differences are there. One is the electoral college for president's election consists of members from the state legislatures. But it is not in the case in vice president's election. It consists of members from only the parliament. Am I right? And the second difference is that the electoral college for president election consists only the elected members from parliament and state legislatures. But in the case of vice president both elected and nominated members of the parliament take part in the election. Am I right? So note the difference and learn the difference. Now coming back to vice president election. See other thing that you have to remember regarding the election of vice president is that the vice president shall not be a member of either house of the parliament or of the house of the legislature of any state and if he is a member then he should vacate his seat in that house on the date on which he enters his office. Now let's learn about the eligibility criteria. See the eligibility criteria includes that he or she should be a citizen of India or he or she should have completed the age of 35 years and they should be qualified for election as a member of the council of the states and they should not hold any office of profit under the government of India or the government of any state or under any local or other authority subject to the control of any of the said governments. Finally note that the vice president is elected for a period of five years. Now with these information go and read about the removal and resignation process of vice president also so that you can complete this vice president topic holistically. So that's all about this news article. In this news article discussion we saw about the election of vice president along with that we saw the election of president also that is we saw the difference between the two elections. So with these key points in mind now let's move on to the next news article discussion. See this article here it says that the Comptroller and Auditor General that is CAG asked the telecom department to review the spectrum pricing mechanism for captive users. See the department of telecom had noted finalized the policy for allotment and assignment of spectrum for captive users or rather commercial services with the approval of the Digital Communications Commission. Now that DCC or the Digital Communications Commission is the apex body for telecom policy formulation and this is about the article given here in this context that is understand more about CAG that is Comptroller and Auditor General. See as per the article 148 of the Indian Constitution it is said that there shall be a Comptroller and Auditor General of India that is CAG of India. He shall be appointed by the president by warrant under his hand and seat. See he will be removed from the office on the same grounds as a judge of the Supreme Court. See read about the removal procedure for the judge of the Supreme Court it will be very much useful for your preliminary examination. So from this what we can know we know that Indian Constitution does not provide for any qualifications or eligibility criteria for CAG but note that he holds office for a period of six years or up to the age of 65 years. In this whichever is early that will be the period of service. It is given in the article that the CAG shall not be eligible for further office either under the government of India or under the government of any state after he has seized to hold his office. It was also given in the article that the salary and other conditions of service of the CAG shall be such as may be determined by the parliament by law and until they are determined it shall be as specified in the second schedule. Also note that the administrative expenses of the office of the CAG including all salaries, allowances and pensions payable to CAG or in respect of persons serving in that office is charged upon the consolidated fund of India that is CFI. See all these provisions that we saw so far ensures the independence of CAG. Apart from this note that the conditions of service of persons serving in the Indian audit and accounts department and the administrative powers of the CAG shall be prescribed by rules made by the president this is after the consultation of the CAG. Now let us see about the functions and powers of CAG. See according to article 149 of the constitution which deals with the duties and powers of CAG it is said that the duties and powers of CAG in relation to the accounts of the union and of the states is prescribed by law made by the parliament. Accordingly the parliament enacted the CAGs that is CAG's duties, powers, conditions of service act 1971. This act was amended in the year 1976 to separate accounts from audit in the central government. See I have displayed some of the important duties and powers of CAG here just go through it. For example he or she audits the accounts related to all expenditure from the consolidated fund of India, consolidated fund of each state and consolidated fund of each union territory having a legislative assembly. Then he also audits the accounts related to all the expenditure from the contingency fund of India and the public accounts of India as well. Not only this he also audits the accounts related to all the expenditure from the contingency fund of each state and the public account of each state also. Then he audits all trading, manufacturing, profit and loss accounts, balance sheets and other subsidiary accounts kept by any department of the central government and state government. See he even advises the president with regard to the prescription of the form in which the accounts of the center in the state shall be kept. Then he acts as a guide, friend and philosopher of the public accounts committee of the parliament. One important thing that you have to remember is he ascertains and certifies the net proceeds of any tax or duty which is mentioned in article 279. The certificate is final in this matter. And one important power or function that you have to remember is the CAG submits three audit reports to the president. One is the audit report on the appropriation accounts, other one is the audit report on finance account and the last one is the audit report on public undertakings. So that is all about this news article. See regarding the functions and power go through all the points that I have given here and I have discussed some few important points alone. But you have to go through all the important points. See these kind of static topics are very much important for your preliminary examination because straight away questions are asked from these topics. So these key points in mind now let us move on to the next news article discussion. Look at this article. In this article our finance minister says the rationale behind the imposition of GST on unbranded, pre-packed and pre-labeled food products. We all know that recently some articles were brought under the GST rigid. So in this discussion we will see the list of articles for which the GST rates are altered. We will also see our finance minister's argument on it, okay. See after the 47th GST council meet the GST rates were revised for many items. The council headed by the finance minister decided on bringing packed foods like milk curd and paneer, unpacked ones like rice and wheat when packed in to 5% GST rate. The other items that are brought under the 5% GST rate are jaggery, puffed rice, organic food. The rest are given in the table and you can just go through it. See the solar water heaters earlier attracted 5% GST but they are now brought under the 12% bracket whereas take the renting of trucks and goods carriage that attracted 18% GST earlier is now reduced to 12% GST. The other items brought under the 12% GST bracket are displayed here. You can just go through it. Then take LED lamps, tetrapacks and drawing instruments will now become costlier as they will start attracting 18% GST from now on. The rest of the articles brought under the 18% bracket are displayed here. You can go through it. See I am providing with these articles so that you can pick whichever article brought under GST is debatable and utilize it into your main's answer writing, okay. This I am saying whenever the question is like critically analyze the bringing in of new items into GST project, okay. Then having seen this now let us see the rationale behind the imposition of GST on unbranded pre-packed and pre-labeled food products as highlighted by our finance minister. See our finance minister said earlier when 5% GST was issued for pre-packed branded cereals, pulses, flow there was rampant misuse by various manufacturers and brand owners. So there was a lot of tax evasion. It is only due to this and to avoid the tax leakage the GST of 5% will be imposed on unbranded pre-packed and pre-labeled food products. In addition to this our finance minister clarified that all food items including wheat, pulses, rice, maize, curd and a sea would be exempt from GST when so loose and when they are not pre-packed, okay. So this is about this news article. See I had taken this article so as to make you aware of the current scenario that is going on with this GST topic, okay. If you want to brush up about the GST you can just watch our Hindu news analysis dated on June 30, okay and that is June 30, 2022. So these key points in mind now let us move on to the next news article discussion. Now have a look at this news article. See this news article talks about GST compensation. We all know that GST came into effect on 1st July 2017. Initially the states feared that implementation of GST will result in revenue losses to the states. To address this concern of the states the union government proposed the GST compensation. The union government said it will compensate the state's laws and revenue due to implementation of GST for the next five years. As the states feared they lost revenue due to the implementation of GST. So the union government has been providing compensatory funds to the states who face laws of revenue. This five-year period that we are talking about has now come to an end. So hereafter the union government will not compensate the state government for the laws of revenue. The news article says that although the GST election has not met the expectation of both the union and the state governments, the union by imposing more tax on non-shareable revenues like union excise duty on petrol, diesel and aviation turbine fuel has compensated its loss. So it is the states know that are now left without any help as the GST compensation period ended. Mainly if you take states like Punjab and Goa they will face the most stress. So that is all about this news article. So in this news article and in the previous news article we saw about the current situation that is running on the topic GST. So this can be put as your main question directly. And for preparing for your preliminary examination I had mentioned that in our June 30, 2022 article we had brushed about this GST clearly. You can just go through it for your prelims perspective. So regarding this GST compensation end and bringing in new items into GST regime there might be a mains related question for you. So utilize these points to enrich your mains answers. So with these key points in mind now let us move on to the next part of the news article discussion which is the preliminary practice question discussion. Today we have three questions in which two questions I will be discussing and one question will be a quiz question for you. Okay. Now look at this first question. See it is regarding the Comptroller and Auditor General of India. Two statements are given. So whenever two statements are given we have to go through both the statements before answering the question. Am I right? Now let us look into the first statement. See statement one is incorrect. According to article 151 it has said that the reports of the CAG relating to the accounts of the Union shall be submitted to the President who shall lay it before each House of the Parliament. And in that clause 2 says that the reports of the CAG relating to the accounts of the State it shall be submitted to the Governor who shall lay it before the Legislature of the State. So the statement one which says that the reports of the CAG relating to the accounts of the Union and the States are submitted to the President is incorrect. Only there of the Union is submitted to the President. Okay. Now look at statement 2. See statement 2 is correct. According to article 150 the accounts of the Union and of the State shall be kept in such form as the President may prescribe on the advice of the CAG or the Comptroller and Auditor General of India. It is clearly mentioned in article 150. Okay. So this statement is correct. Now read the full question. The question is demanding for correct statement. So your answer here will be option B, 2 only. Now let us move on to the second question. See this question is regarding the Vice President. Okay. This is also a two statement question. So I am going to go through both statements before arriving at the answer. Okay. Now look at statement 1. See statement 1 is incorrect. See as per article 60 in clause 2 an election to fill vacancy in the office of the Vice President occurring by the reason of his death, resignation or removal then the person elected to fill the vacancy shall be entitled to hold office for the full term of five years from the date on which he enters upon his office. Okay. So the statement 1 which says that he or she who is elected to fill the vacancy can hold the office only for the remaining period of the term is incorrect. Now look at statement 2. See the statement 2 is also incorrect. As per article 67, a Vice President may be removed from his office by a resolution of the council of states. So formal impeachment is not required for his removal. The resolution should be passed by a majority of all the then members of the council and agreed to by the House of the People by a simple majority that is majority of the members present and voting. So the statement 2 which says a Vice President is removed from his or her office in the same manner as there of the President is incorrect because for President we go for impeachment. Okay. Now look at the question. The question is demanding for correct statements. Yes, the answer here will be option D neither one nor two. Now displayed here is the quiz question for you. See this is regarding the GST. As I said if you go through the basic concepts about GST you can answer this question very well. It is a very easy question. So try answering this question, post your answers in the comment section and the right answer will be posted in the comment section itself. Okay. So that's all for today's prelims practice question and quiz question. Now let's move on to the mains practice question. Go through the question once and try to write answer for this question. See keep writing. It will be very much useful for improving your writing skills for attempting the mains examination. Okay. So that's all for today's discussion. If you like this video do like, share and comment and don't forget to subscribe to the Shankara's Academies YouTube channel. Thank you for listening.


Welcome. My name is Ryan Fox. The title of this talk is To Infinity and Beyond. We're going to talk about computer vision and image processing, how they're used in astronomy, and in other applications. This is where you can find me on the internet. I work with companies in astronomy and aerospace and drones doing software development. So I use image processing and computer vision a lot. I'm going to explain what those mean and how you can use them in a little bit. Not everything in this talk is going to be astronomy related. But a lot of earthbound techniques use the same applications use the same techniques. The goal of this talk is to give you an idea of what's possible, what exists, what you can do with it, and how you can use it in applications you're developing. This talk is going to be three main parts. This is image processing and we'll work our way from lowest level building up to high level, more complex tasks, move into computer vision, more of the same, and then how you can use it beyond the end of this talk. First we have to take a little detour into how computers actually see. Raster images are stored often as a two-dimensional matrix. You get eight bits per pixel, zero being pure black and 255 being pure white.  It's just a direct mapping. This is a single-channel image grayscale. You're not restricted to one channel though. It's common to get three channels, red, green, blue. This is the format most of the images you encounter on a day basis are. You have a separate channel each for red, green, blue, but you can change the color space so you also during processing you might operate in different color spaces. You're also not restricted to just three channels. There's a format commonly used in astronomy called fits where you can store a raster image and have basically as many channels as you want because it's fairly common to take an image of the same object at many different wavelengths. The important thing to remember from this is that any operation you want to apply to an image, you can apply to one channel or all three channels or all channels. Now to explain what we meant by image processing versus computer vision. If you talk to ten different people, you're probably going to get ten different answers. There's no hard definition. But for the purposes of this talk, when I say image processing, I mean something operating on a low level versus computer vision, you want to get more intelligence about what's in that image or photo. Image processing algorithms usually are working on a pixel by pixel basis. In computer vision, you're more concerned with an image holistically. A lot of image processing things we're going to talk about you won't actually directly use but the components in a larger pipeline. Usually the goal of computer vision is to get some knowledge about an image or photo and be able to do something with that, whether that's label it or use it as part of a larger set. A lot of times for an image processing algorithm the input is an image obviously but the output is another image that's been transformed in some way. With computer vision, your input is also an image and you might not get an image out, you might get information about that image on a broad level, what the image contains, what it's a picture of more or less. Just as an example, this is the same picture fed through two algorithms. On the left it's been processed by an edge detection algorithm and on the right it's been processed by an object detection algorithm. On the left we don't really care what's in an image, we just want to find the boundaries of what objects are in it and where. And on the right we don't particularly care about what color it is, what way it's facing, where the actual lines in it are outside of the general region in the image where it is. It gets labeled with a car. We're about 64% sure that's the case. I think it did all right on that one. If you're going to be using Python for computer vision, use OpenCV, it's a fantastic library, lives at OpenCV.org. It's written in C++, there are Python bindings, but it's kind of a pain to build and import the objects into what you want. There is package on the Python package index called OpenCV Python. If you're not interested in using it for C or C++ applications, you can just pip install this and it gets you pre-compiled binaries. So easy one-step installation. Once you've got it, just import it as usual. This is how you read an image. And then once you have it imported under the hood, it is stored as a NumPy array. So it plays fairly nicely with NumPy, SciPy, and Pillow, which is another imaging library on Python. If you ever use that one, it's also pretty nice. And then once you're done with whatever you're doing, it's also easy to save basically any image operation you want on top of the ones we're going to talk about. So that gets us to the image processing portion of our talk. We're going to run down this set of features. We're not going to go too heavy on math, but your takeaway you want is to have an idea of what it is and how it works on a broad level. So first up is convolution. This is a low, low-level building block for a lot of image processing applications. Don't worry about all this. Basically, what you want to remember is this is a lot of times how a filter is applied to an image. This is used as a... Sorry.  That filter is called the kernel. That's about all you need to remember from that. Here's how roughly it works. On the left, we have our image. In the middle, we have our kernel. You set the kernel down in the top left. You go element-wise and multiply by the weights in the kernel with your pixel value. And then at the end, you add them all up. Once you're done with that, you have to divide by the sum of the values in the kernel so your image doesn't get brighter every time as you're multiplying and adding all these numbers up. And then the pixel in the middle of the kernel on the left you store here in the output image. Once you have that step done, slide it over one and repeat and do the same thing. What particular values you pick for your kernel is going to change what the operation does. This particular kernel has the effect of blurring an image. This is the cadi nebula. On the left is the final product that's been released by NASA and applying that kernel gets you this. So that's nice. We can blur images, but why would you ever want to do that? It seems like you're kind of throwing away information. Well, one useful property that blurring it has is reduces the noise. You can see there's a lot of stars in the background on the left, not so much on the right. So that's going to be useful for feature extraction. This is basically detecting shapes in an image, whether that's lines, circles, corners, edges. OpenCV has a lot of built-in features for this. First up, we have edge detection. The one OpenCV has is called the cani edge detector. First up, it blurs the image. Second is it calculates the gradient, which is just the change in intensity, direction and magnitude in a particular region. Once you have that done, if you look at each smaller region of the image, if it's a place with a low gradient, maybe you're kind of in a sea of flat color, not really an edge. If you are in a place with a high gradient, maybe you're changing from one color to another to light to dark, that's something a human would probably describe as an edge. Here's a picture of Hubble telescope. You can see this one did pretty well. Some of the solar panels, we got fairly good lines and even banding around the bottom of the telescope. On the front of the telescope, though, it's kind of a mess, but to be fair, if you gave a human that sub-picture and asked him to find the edges, there's not much to go off. We can also detect corners. This is also fairly noisy. All these operations are going to have parameters that you can tune, and what you choose depends on your application, really. What your tolerance to noise is going to be false positive rate, false negative rate. So really, I have to see what's going to work with your dataset. We can see here, still found all pretty much anything we described as a corner on the solar panels, the radio dishes, and then along the telescope. Notice not on the sunshade, but on that little notch on the top, we have a smooth curve there, and it thankfully passed those over. Moving on, we have a huff transform. This is how you can detect lines or circles in an image. Same thing, we look at Hubble, we found our solar panel lines pretty well, and again, a lot of noise. You can see, depending on your image, it's not always going to give you a great result. You kind of have to play with it Finding lines in an image is often useful for real-world applications. This is sort of the first one where it has a little world mapping. If you are programming a self-driving car and you want to stain your lane, you might put a camera facing forward out the front of the car, and ideally you want to see a line on either side, converging toward the middle. If you've got one below you or maybe two off to the same side, you can rectify that situation. Next up is feature descriptors.  This is a way to quantitatively fingerprint a region of interest so you can compare it to other regions. OpenCV comes with a bunch of different classifiers, that all have different properties, different processing speed, whether they're susceptible to rotations or scale changes, color, skewing and warping. These two, SIFT and SURF, I'm going to mention for historical purposes mostly, they were some of the original really accurate ones that opened the door to show what could be done really. Unfortunately, they're patented and combered. They are still in OpenCV, so you can try them out if you want, but it might be a little risky. Luckily, OpenCV has a bunch of other ones, all with the pros and cons, all not patented and combered. We're going to talk about ORB, which is a two-step process. ORB stands for oriented fast and rotated brief. Fast and brief, of course, stands for something else. It's a two-step process. Fast is a feature point detector, so it's going to locate edges, corners, places that might be described well in an image, and the brief actually describes them. Rotated alludes to the fact that it's supposed to handle rotated images fairly well. So if we have a picture of tranquility base, if you asked a human to find some points where you could maybe line up another image with that, what do you have to go on? Maybe the antenna on top of the space suit, the equipment on the ground, the flag, the lunar lander. It's kind of hard to see this resolution, but with the feature point detector applied, it did find the top of the antenna. There was some space suit found three corners of the flag, so it does all right. Once we can describe where an image is, we're going to talk about image segmentation. This is basically splitting an image into multiple sections like a region of interest. The simplest way to segment an image is thresholding. You just pick a threshold value and all pixels above that, you take it to be one, you take to be zero. You can threshold on anything you want, pretty much intensity or color are pretty common. If we wanted to segment this image to get our astronaut out of the sky, the background behind him is pretty dark. He's really bright, a lot of white pixels in there. The earth's kind of somewhere in the middle and there are some clouds, so we might have to deal with those separately. If you play around with your threshold to see what you can get, this is just a binary mask now. Once you have your image segmented, a lot of times it's useful to use erosion and dilation. This is basically going to make the white portion of your mask grow or shrink. So if you dilate it, it's going to fill in holes like a lot of these shadows in the space suit. Erosion does the opposite. A lot of the tiny little specks will be washed away. It's important which order you do it in, because it's coming to use them in tandem. If you erode, then dilate, that's going to eliminate noise. So if you have speckles in the background, those get washed away by the erosion. Then they're gone so they don't come back with dilation. If you do dilation first with any erosion, it's going to do the opposite and maybe fill in some of these rivers in the big picture. Here's some successive erosions applied. You can see that the space suit does kind of wear away, but also the clouds from where we're right got much fainter. And then the opposite. This is what dilation looks like. A lot of those shadows on the space suit are filled in, but then also the clouds are getting stronger too. Once you have your image segmented, you want to do something with that. So selecting a contour is a common way to do that. It's basically picking out a shape. It's usually what we're after as the final step when we're segmenting an image. OpenCV will find all the contours in an image, so you'll get one blob for the space suit, another one for this cloud, another one for this cloud. It's common to sort them by size, and then you know the guy taking the space walk is likely to be the biggest one. And then if you combine that mask with your original image, you can select out just his pixels. Histograms are another way to separate an image. It works by putting pixel intensities into bins, so you get a graph with dark pixels on the left, bright pixels on the right, and the number at each intensity. Here's what the histogram for Hubble looks like. NumTi has this. OpenCV also has histogram functions. You can see there's a lot of dark pixels. This is a log scale, so we're talking on the order of a million pushing 10 million dark ones, and then a handful around 10,000 really bright on the sunshade and reflecting on the barrel. Now, this is a picture of the Eagle Nebula. It's a fantastic image. This is not what an image that comes down from Hubble looks like. That's what an image that comes down from Hubble looks like. Astronomers are operating on low signal to noise ratio a lot of time, so how can we improve this? This is the histogram for this image. If you can see the numbers there on the left of the scale, that's 10 to the 8, so we're pushing 100 million gray pixels and basically nothing else. You can see there's a few bright specs, so some stars shining through, but not much. Histogram equalization basically takes this and forces it to conform to a more regular shape, oftentimes a normal curve or something approximating that. Now, there's been more processing steps that went from side A to side B, but you can see there's a lot of detail there that is totally invisible in the original. That's one of them, yes. There's been more exposures combined. Image registration is a fancy term for lining up images. You might have to deal with translations or rotations or perspective changes. There's two main uses. One for making a bigger picture, for making your field of view, and two for increasing clarity on maintaining the same picture size. Panoramas, people pretty intuitively understand your phone does it probably. You take multiple images. You can see this one's three. Once they're registered, you can kind of blend over the edges and then get a larger picture. One issue is that you can get a lot of distortion toward the edges, so there are ways to do that. If you're familiar with this image, this was taken by Hubble. This is actually a panorama. It's called the Hubble Deep Field. They pointed the telescope at an empty patch of sky and exposed for days and days and days to see what was there. And then when they looked at the end, this is what they got. Now Hubble isn't actually one camera. This is a composite of four. That's why you have the strange shape of your camera on the middle, too. That brings us to the other way you might want to... The other reason you might want to register some images is stacking. Instead of increasing your field of view, this is going to increase the fidelity of your image. When you take any given image, if it's for astronomy, you can have a lot of sources of noise. Much of this is inescapable. And then even if you're photographing stuff around your backyard, there's a lot of different things. What can you do about that? Well, if you take a lot of pictures of the same thing, kitchen table in this case, with a straight, dry erase marker walking across, if you apply feature detector to it, you can line those all up. And then on each pixel alignment, you stack them up and then sort them and take the median value. The idea is that if you had bright pixels, those will rise to the top of the stack and dark pixels will fall to the bottom. Along with thermal noise, anything else, hopefully it will average out over your run of shots. So ideally, the middle pixel leaves you with something approximating the ground truth. Yeah. If you look really close you can actually see some ghosts. The fix for that is to take more pictures. Well, the hope is that if you have some random noise or a transient error, the more pictures you take, the more of them are going to contain the true image that you're looking for. So if your signal is just totally washed out and you can't even get a solid image in half of them, you might not have much luck. Quick question. You can, yeah, a lot of applications deal with rotations or translations. Once you have them lined up, all you need you can resample a pixel grid. Everything is rectified on top of each other. You just have a list of integer values, so you take the median. The left picture is a crop from one of the original ones. The right one is the finished product. This was never actually taken from a camera. It's just composed of the other five. I don't know how good our quality is here, but you can see it's quite a bit of noise reduced and it's a lot less grainy. Now we're kind of crossing over into computer vision territory. We're going to talk about higher level techniques what you can do with them. First up is object detection. Really, this is the problem of, given an image, how can you find that in another image? This relates to registration, if you might have one of those rotations. OpenCV has a handful of ways to do this. Feature matching is going to rely heavily on those feature descriptors we talked about. Histogram back back projection is a process where you take the histogram of your sub-image and compare it to regions on the larger image so you get a probability that that picture came from the original. Harcascades and neural nets are both useful for this thing. They're also useful for object recognition in general, so instead of finding one particular instance of a cat, you find any cat. This is a wheel from the Curiosity rover currently on Mars. If you apply that orb feature detector you can see pick up a handful on the treads and then also some on the chassis of the rover. Not much on the dirt. That's pretty good because it's fairly uniform. We don't want to key on too much there. Here's the original image you came from. The way feature detector matching is going to work is it finds the feature points in your sub-image and finds the feature points in your larger image and to a computer those are just numbers. So it can block them and then for all the feature points in your smaller image it looks for its nearest neighbors. If it finds a region in a larger image where a lot of those are close matches then you've probably got consensus that that's where it came from. OpenCV lets you draw the matches even and you can see the feature points on the chassis match up fairly well and then also ones on the treads. The lines are pretty thin but it doesn't line up well. Now orb is supposed to handle rotations. You can see the feature points in our match up there are still on the chassis and cut across and do match up on the other ones. So orb functioning today. Object recognition I touched on a little earlier. This is about matching any given instance of an object. There's two popular ways to do this. Cascade classifier one of those is called the hard classifier that uses known characteristics. You know that's a really great of this too but one of their shortcomings is we don't really know how they do what they do. So hard cascades operate under the assumption that a lot of pictures of for example human faces have a lot of the same characteristics at least in photographs. Light generally is coming from above you so it's your forehead which is lighter than your eyes and it'll also illuminates your cheekbones. So there's a set of filters that get set up to compare regions on an image to how well it stacks up against those. Now it's important to know that one built into OpenCV wasn't trained specifically on Neil at all it just uses those characteristics. The one OpenCV is bundled with has I think on the order of 1,000. When you run it hooray if found Neil hard cascades tend to be fairly fast relative to neural nets they can be fairly performant but they take more time usually and can take a lot of memory as well. Yeah depends what your phone is or camera they use both ways a lot neural nets are a relatively recent development they've been they've been showing a lot of promise and they're getting better all the time. OpenCV also comes with other feature detectors bundled in this was detected using the frontal face detector there's also one for faces in profile and a pretty cute one there's one for cats as well someone got that pull request accepted. Alright so let's talk about a different kind of problem reverse image search so instead of looking for an image inside another image given an image what is it a picture of say the Eiffel Tower or George Washington this is a service astrometry.net provided to the public their mission is given a picture of anything in the night sky where is it what are you looking at not only hard sounding problem at least this is one taken from their archives if you're familiar with a lot of deep space objects you might know where this is but if I cropped out that segment in the middle you might have a hard time so what can we do to figure out where this picture is the way astrometry.net works broadly speaking it finds the brightest stars and then it's going to map a set of triangles over them triangles the angles and side lengths the ratios between side lengths aren't going to change when you zoom in or rotate so that gives you a stable feature so to speak to search on once you have a set that characterizes your image you can search a catalog of known distances and angles between bright stars this is the annotated version we can see it found the big nabla it also located an object on some of the brighter point sources and then this brightest one in the bottom is labeled Alnatac which is also Zeta Orionis in the Orion constellation if you're familiar with the horse head nabla you know that's in Orion so found the right spot so that's cool but what if we can't calculate triangles what if you just want to find another image you could do a feature point search but that's going to be prohibitively time expensive over a large image set that is something called a perceptual hash if you're familiar with cryptography hashes desirable property is for every bit you change in the input you want the output to change a lot so you can't tell that you guessed close to a password you just want to be able to tell yes or no image hashes we want to have the opposite property if we change it a little bit we don't want it to change much given lossy compression if you strip off one row of pixels the image hasn't really changed but a computer wouldn't necessarily see it that way so these are three images the two on the left are different they were taken a second or two apart if you look closely you can see some of the waves have moved the boats in the background the one on the right is substantially different but not a ton there's quite a bit more green grass so how can we get a hash that will tell us if the one on the left is equivalent or at least close and the one on the right is not so much there's one called D hash there's another there's several other hashes this one in particular the one I found to be the best performing it's a fairly simple algorithm convert your image to grayscale simple enough resize it down to a very small size something on the order of 8 by 8 and then iterate over each pixel in one direction it doesn't really matter you just have to be consistent if the next pixel is brighter or darker if it's brighter you write down 1 if it's darker you write down 0 so at the end of your 64 pixels you have 64 bits which is a number computers good at dealing with those you can still see the original image somewhat there's light water at the top a very bright path to the bottom everything else is kind of muddled the same these are the D hash of those three images the two on the left did hash out to the exact same value so we went in there and the third one not so much D hash also allows for fuzzy matching so you don't have to have an exact match to tell that the images are close Hamming distance is the distance the number of different bits between two strings there's a library on the Python package index that makes it fairly easy to use these as well you feed it an image and it spits out a number optical character recognition isn't used so much in astronomy but it's useful for a lot of earthly applications neural nets have made a lot of big strides here one of the big engines for this is called Tesseract it's backed by Google currently the latest version uses something called LSTM which stands for long short-term memory it's a kind of neural net there's an interesting name on that one there is Python support for this with PyTesseract again fairly simple, you feed it an image it tells you what words are in it QR codes are a special kind of barcode two-dimensional barcode a lot of people are familiar with the three big blocks in the upper left the upper corners and the lower left corner those are for locations when you have an image the algorithm will key in on the location of the QR code based on that there's also alignment blocks you can see in the lower right there is a clear space around a single pixel there and then as you add more and more image to a QR code they actually expand and this one has several alignment blocks those are for rectifying the image so if the picture is taken at an angle you can square it up and read those pixels out photogrammetry yes it's possible so if you have a key point detector or some geometry that's known ahead of time you can compute the transformation between those two so for example if you sheet of paper you know it's going to have right angles if you look at the angles the lines you can figure out how that was skewed and project it back onto an 90 degree surface so yes they do have uses outside of QR codes so that's a prominent one we're actually going to come up to something on that shortly photogrammetry in general is getting physical measurements from imagery drones are really suited well to this you can use satellites for it but they're very high up and they cost a lot so you're probably not going to use one on the other hand drone hardware is getting better and cheaper all the time there's software where you can get a google map style view of your local neighborhood and trace out an area and it'll automatically canvas it so once you have this set of pictures what can you do with it we can generate a map or an orthomosaic which is kind of a map on steroids usually when you stitch a panorama you can blend all the seams together but that warps your image so you can't necessarily calculate an angle or distance accurately an orthomosaic is the same thing but with those distances preserved you can see here there's some gaps at the top and bottom usually that indicates there was a tall structure or a large slope on the ground maybe where the drone couldn't get eyes on that side of the object it would just kind of get washed out as parallax artifact in a panorama but not so much on an orthomosaic with point clouds you can also generate a point cloud so that gets you 3D modeling so you can make a contour map you can do area or volume measurements you can also use these kind of things for terrain classification so you might want to separate this image into a field area and a wooded area and then the house this is what the point cloud looks like one another recognition task in some of these projects is ground control points basically you have a big tile you throw it on the ground that acts as a QR code once the image processing software sees that you tie that to a known reference location in the real world and that can help your accuracy out it's kind of hard to see from one static image of a 3D point cloud but you can kind of get the idea that woods go up from the house a little bit and then also the ground slopes off down here so that's about what you would expect from looking at that orthomosaic neural networks are useful for a lot of stuff they are starting to get incorporated in OpenCV but they haven't been too much yet they're useful for a broad array of tasks image classification given an image what is it a picture of object recognition locating those objects in the image YOLO stands for you only look once OCR they're really good at a lot more stuff as well so here's an example of image classification just give a picture what is in it we got a lot of people the grass it's outside yeah pretty well fits pretty well some of the lower probability matches are interesting although umbrella you can kind of see where it got that from and then object recognition localizes objects in an image you can detect sure it has cars but where are they people multiple classes that sort of thing so now that ends the tour of our computer vision portion of the talk so let's talk about how you can use this in real life now that you know some building blocks you can see how those can be composed into a pipeline maybe you want to load an image select some object classes in it send that off somewhere else or load a bunch of images and create a panorama there's a lot of libraries library support for this sort of stuff OpenCV as mentioned all talk is great there's a lot of APIs for this stuff too so if you don't want to deal with implementing it on the back end Google Cloud, Microsoft Azure AWS all have some applications some APIs for you to use if you're interested in astronomy data processing AstroPy is great it's under active development it works well with those FITS files I mentioned earlier if you want to do sacking this is another free program deep sky stacker there's a lot in this space but that's just one that I've found it's nice Hugen is an image panorama stitching application it's nice because it's scriptable and then if you're interested in more of the drone side there is a newcomer on the block called open drone app that will do a lot of that OrthoMosaic and point cloud operations actually I need to take a step back I kind of glossed over this side a little bit this looks like pseudocode but it's not actually pseudocode this is code from a project I've been working on I mentioned I work a lot with drones a lot of those missions involve repetitive tasks kind of doing the same thing over and over well what do programmers do with repetitive tasks we automate them so I wrote a programming language it's called DIL for drone imaging language it lives here on github this is a domain specific language so meaning it's not intended to be used for general purpose programming it has one specific niche these examples actually came from DIL this is a panorama of downtown milwaukee it's one of those 360 degree panoramas DIL can create can create the panorama and then put it in a nice web viewer so you can look around pan around zoom in and then this is me flying on a mission actually the object detection is done with a neural network based on YOLO so imagine the question a lot of you have for me right now is why why write a language for this why not just a python library or even just a script and when I talk to programmers a lot of times about programming language I ask oh have you developed any because I'm interested in languages and I get this blank look or no I've never even considered it or they don't think they have the technical chops and I don't think that's true so there's three aspects of domain specific languages and I think we can do ourselves well to this project the first is that domain specific languages don't have to be complex if you think about a general purpose language like python or java or javascript there's a lot of grammar there if you had to write a first so that's a really heavyweight task python itself has some of these built into it the date time formatting spec if you've ever tried to deal with if date dot month equals equals four string plus equals that's a nightmare instead you just give it a format string put all your symbols and you want and then out comes a nice human readable date regular expressions are another domain specific language they're great at parsing text they're also kind of infamous for not being great when you try to apply them outside their domain now you have two problems there's another one python in the documentation it's called domain formatting mini language if you want to inject some values into a string maybe format a number nicely this helps you do that if you remember the left pad debacle from node.js it's nice to have something like this in your standard library the second aspect is that domain specific languages trade generality for simplicity this is the entire dill it has five commands they're all fairly self explanatory you can load a set of images or an image you can highlight some object classes in that image you can stitch a panorama you can show that panorama in a web browser and you can save your results that's it when I was implementing it I didn't have to worry about recursion or branching or memory storage anything just keeping the spec small enables you to have a narrow focus when you're developing it and the third is that languages are interfaces programmers like to maintain and talk about separation concerns keeping the design separate from the implementation of something python is a case of this there's the cpython implementation but also highpy, jython, iron python some others implement the same language but they're different under the hood by designing the language to be separate by designing a language rather than a python class that forces this implementation to be separate a lot of imaging tasks are what could be called embarrassingly parallel for example a 2017 desktop processor might have four or eight cores and a roughly equivalent GPU might have 2,000 let's just do the nature of images like if you want to render a pixel you don't have to go all five other ones before you do that so if you wanted to you could re-implement the DIL in a way to take advantage of this if you had a really large dataset to chew through and lastly creating interfaces joining them together using interfaces as a programmer to stock and trade you're already doing that pretty much every day so the next time you find yourself needing to implement an API while I'm a big fan of using the right tool for the job don't necessarily dismiss it out of hand it's not necessarily as difficult as you think that wraps up our talk here's where you can find me on the internet and thank you for listening sure right so the question was if I understand you right how do you quantify or you have to still know about the error bounds on your noise yeah that's a difficult question in general a lot of astronomy operates right at the margin of signal to noise a lot of a lot of preparation goes into setting up an observation you can generally have an idea of your instrument what kind of noise you can expect and what you're observing what you expect to get from the object sometimes you don't get anything sometimes you just get noise sure there is for basically every observatory there's been a lot of work in characterizing the instrument itself so they have a pretty good handle on the error bars of the entire system you're talking about this guy right yes so the question was about importing raw files from a digital camera as far as I know there isn't anything in OpenCV for that but it handles TIF formats and there's an application called DC raw which will convert basically any raw into a TIF PILO also does it TRIPILO then also potentially yeah so asking about using over and under exposed images along with the regular exposure that's called HDR imaging high dynamic range so back at the start when we talk about 8 bits per pixel per channel so you have 24 bit color that's nice but that's not a ton of dynamic range if you take another picture so if that's your standard picture you take another one over exposed under exposed you can expand that so a common example is in a room with some direct sunlight coming in the windows if you take a regular exposure the windows will just be blown out and totally white if you take another image with the exposure cranked down you get a regular exposure outside of the window but everything inside is dark so if you align those images you can take the nice the well behaved parts of each of them HDR is something you can google if you're interested in learning more about that that's built into a lot of cameras nowadays actually yeah so you're talking about some of the open cv examples not many, maybe on the order of 10 so loading the images align and then open cv actually has a blur function so that's one more line and then if you want to save it out or show something some of the more complex ones like finding features let me come to that one there we go those are going to be a little more setup because you're dealing with multiple images you have to create a detection object and then map between them not more than maybe 15 or 20 lines I'm a consultant so I work with companies that use video or imagery in their products I've worked with local astronomy observatories I worked with a national radio astronomy observatory they run the VLA which is out in New Mexico if you've seen the movie contact the satellite dishes out in the desert that's a real place it's a working observatory and I've also worked on James Webb's Space Telescope yes no no one touches the telescope or anything else where you start to get shadows or light how do you recognize the image sure that's a fairly difficult problem in general if you have aligning images that have drastic changes you probably want to try out different feature descriptors and see which one works the best for you it's easy to write or come up with a bad feature descriptor the good ones have been pretty babble tested I have a lot of research going into them so I would say probably try the probably run through the ones available in OpenCV these guys and see which one works best for your data set and these ones have different properties depending what kind of changes you want to be you want to count as a positive or negative result yeah my website is foxrow.com they're not up yet I'll put them up in the coming days I think that wraps up our time so thank you everyone for coming


Hi guys, we are here with another video for my design team, excuse me, for August 2018. This month I've challenged them with the words ornate, imagine and believe. I created a scroll work style digital download for them, which you all can buy a copy of in the Etsy store. I'll try to remember to put a link in the description below, but if I forget, somebody remind me because I do forget. I also wanted to show you some new things I've created recently in my Etsy shop. I am going to do that while I'm creating a journal page. So I found this word in my stash of words, imagine. This was sent to me by somebody in Happy Mail. They obviously, to me it looks like they sprayed it with spray inks and then did some stamping on it. And it has scroll work and fancy doodles on it. So I thought that would work really well. I've got my Moleskin 2017 weekly notebook, which is what I've been working in. It has kind of thin paper, as you can see, because you can see the images on the other side through it. But I like that. I think it's interesting and challenging. We're going to start with putting a little bit of color down, not too much. I just want to put, I'm just going to grab one. This is a light, sky blue Amsterdam acrylic paint, and I'm going to just put, just like that. That's probably too much even. And maybe a little bit of yellow. So this is Naples Yellow, Naples Yellow Deep. I love these little tiny tubes because they're easy to travel with. So if you are wanting to take paints with you when you're traveling, maybe going camping, or maybe you're just doing art in a different area of your house, these little tubes are easier to take than the big, giant ones. I'm going to just spread that with a gift card. I've got some pieces of thin plastic cutting boards protecting the other pages in the book. I pick the cutting boards up at the Dollar Tree. You get two of them for a dollar, two or three. I think it's two. They're just clear plastic and then I cut them to size to fit my different journals. They cut real easy with a regular paper cutter. So now we're going to put this up here for a minute. I have been lately into paper cutting. If you're watching my channel and you're a regular viewer, you already know this because there's been a couple of videos out. It's been in my vlog at least once. I took some of my paper cuts and I scanned them and made them into files that you can either hand cut or trace and use in your cutting system machine. I have a silhouette. Hang on, that's my washing machine. Hang on. It's so loud. These are, I also sell a few of the sets already pre-cut in my Etsy shop. Again, I'll put a link to the shop in the description below. You can look around and see if you can find these things. These are some of the off cuts, the ones that didn't quite make it or the whole set came out correctly except for one and then I can't sell it because it's short of one. So anyway, so I have a whole bunch of these and that's what these are. So I do think we're going to use some of these today on our page. I also have created recently a download bundle of images and designs that you can use to print on top of one another to create sticker sheets and print them on. This is an Avery Full Sheet sticker sheet and create stickers or washi tape. I love it and I did cut some of it up into washi tape. When I was creating these, I accidentally printed this plain background on this plain printer paper and you know what, I love it. So you could of course take any of these and print them by themselves onto regular printer paper. Now each one of these, so you can see that this is here in the background. That's one layer and then the color is another layer and the files are created in the download so that you have these separately so you can combine whichever ones you want. So we're going to use some of that too. I've also created recently some positive affirmation cards for the Etsy shop. It's again another download with instructions for how to make the cards in the description of the listing. I was making some cards of the cards the other day and these are sort of the leftover pieces. So I have those two. I don't know if we'll use them but they're out here on the table. They're very totally usable. So let's see what we can make. Let's keep our challenge words in mind. I'm going to of course use the word imagine. I've got this here that's going to look great on our page and I'm going to see what I can do. I'm going to speed forward through the process. I'll be right back. Okay there you go. A quick easy fun page. I love it and the thing that surprises me about this page is I'm not a huge yellow and green fan but I love this page. Anyway this just shows what you can do with just a few simple things laying around your art room to be expressive, get some art in, you know make yourself happy. That's what it's all about. The design team has come up with some great ideas this month so I want to encourage you to go watch their videos. The links are all in the description below and don't forget to check out my Etsy Shop if you have a chance. Support my channel and the free content here on YouTube by shopping in my store. I sure would appreciate it. The most important thing of course is go out, make some art, have some fun and do something nice for yourself because you deserve it and I'll see you later. Bye guys.


So, this is where we were last time we were trying to evaluate this integral which is not too difficult to fix now. So, let us continue here see what happens to the first integral that is basically half of V to the minus half minus z by 2. So, this would be V to the half minus z by 2 divided by half 1 to infinity right. Similarly, what happens to the second integral something similar V to the minus z by 2 and then here we get 1 to infinity this of course, we do not integrate we will just write it as. So, this is just a slight rewrite of the same thing and now if we look at the actual values here what do we get well here of course, while evaluating this integral we have to assume that for example, real part of z is bigger than 1 because otherwise if real part of z is less than 1 then when you set V to infinity it diverges which you do not want. So, under the assumption that real part of z is bigger than 1 when you set V to infinity this is 0 when you set V to 1 then what do what you get is 1 over z minus 1 fine. Similarly, here we need to assume that real part of z is bigger than 1 sorry bigger than 0 which is anyway fine because we have already assumed real z is bigger than 1 when V equals infinity this goes to 0 when V equals 1 then this becomes lots of minuses here this should be right and plus this integral. Now, let us switch back I guess several of these before. So, this is what the expression for zeta was zeta z pi to the minus z by 2 gamma z by 2 is this integral which we have split into these two parts and this is the part that we just managed to rewrite as that long integral this one fine. So, let us just plug that value in here and see what we get equals stick that in which is 1 over z minus 1 minus 1 over z this is actually also equal to 1 over z z then plus this 1 to infinity V to the 1 minus z by 2 and in addition this part which we have not touched and we will just copy this part as it is which is again changing the variable name from u to v we get v to the z by 2 w v. So, this is the result of all this hard work through Fourier analysis and what not, but what we get out of this is something very interesting see the right hand side first thing to notice in the right hand side is not obvious, but once you realize it becomes obvious is that the right hand side is invariant under the substitution z by 1 minus z the first term is 1 over z z minus 1 you replace z by 1 minus z z minus 1 becomes minus z and z becomes 1 minus z.  So, these two integral just swap with each other. So, this implies that so if right hand side is invariant of course, the left hand side is also invariant under the substitution and which means and what does this show us well we know the definition of zeta z for all z with real part greater than 0 real part greater than 1 it is defined by that infinite sum we did little bit of playing around with it to define it also between the strip 0 and 1 and now the question that we started with was how to what definition do we give to zeta z 1 z has negative real component. Now, stick a negative real component to z what do we get say zeta of minus half well pi to the minus. So, let us say z is just take an example suppose z is minus half plus i t from complex number with real part minus half then zeta of minus half plus i t pi to the minus i t divided by 2 this equals zeta of 1 minus z 1 minus z is what of minus i t. Now, this is well defined pi to the whatever power is well defined gamma of minus quarter plus i t by 2 is well defined if the gamma is well defined on any non integral negative number. So, this is well defined gamma of half minus i t is well defined pi to this minus is well defined and gamma again gamma of quarter minus half i t by 2. So, that gives me a definition of or a value to gamma minus half plus i t. So, in fact if you just think about it for a moment this is 0 and you take the line let us say this is 1 this is half this relationship which I just derived this relationship can be used to define the value of zeta at any point here using the value of zeta at this point which is just a reflection around the line z equals plus half real z equals plus half right because gamma z or sorry zeta z is defined in terms of zeta 1 minus z which is a that is a symmetric quantity with respect to z equals half line. And since we know what the value of zeta is on this domain we just extend the same thing to get the value of zeta on this domain. So, that is that is that is it I mean it is although this relationship if you think back that this integral we said when they evaluating this integral and sending this is 0 that real z must be greater than 1 which means that this relationship holds for real z greater than 1. So, there is a question here why when this relationship only holds for real z greater than 1 how can we conclude this equation that is because analytic continuity look at the right hand side it is easy to see that this is defined everywhere the right hand side except for 2 points at z equals 0 there is a pole at z equals 1 there is a pole because of this right. So, this gives poles at z equals 0 and 1 at all other points this term is defined what about the integrals see if you recall the definition of w v w v was sum n going from 1 to infinity e to the minus pi n square v. So, this infinite sum converges for every v and in fact it is easy to see that this infinite sum is going to decay very fast something like e to the minus v at least as badly as e to the minus v also because every single term there is e to the minus first term is e to the minus v second term is e to the minus 4 v e to the minus 9 v e to the minus 16 v when you add all of them up you probably do not get anything better than maybe e to the minus 2 v actually we will get something even less. So, this decays really fast sorry now e to the minus 2 v e to the minus v by 2. So, this decays really fast and this is a only a polynomial the key difference from the earlier case was that when the integral is from 0 to infinity and z real z is a big bigger than 1 here for example, this becomes 1 over v to the sum positive power and when v is 0 this diverges. So, this integral now is from 1 to infinity this part never diverges this behaves at most a polynomial either as in the numerator a polynomial or in the denominator a polynomial which does not matter I mean this is decays. So, fast this will converge for every value of z similarly for every value of z this also converge. These both are clear. So, these two converge on all z these two are converge on all z except for 2 poles at 0 and 1. So, right hand side is defined for is basically a meromorphic function x with 2 poles at 0 and 1 and it right hand side agrees with the left hand side on the half plane real is greater than 1. Therefore, by analytic continuity and its uniqueness we can analytically continue the left hand side and make it equal to the right hand side on the entire complex plane which allows me to extend the definition of zeta z all over because I know pi to these a minus z by 2 and gamma z by 2 are defined everywhere except for some poles. So, this equation itself guarantees that zeta z exists on all points except for some few poles which we will see in a moment and then we can use this relationship to derive this relationship between zeta z and zeta 1 minus z which gives us a nice way of calculating zeta z on the negative side using zeta values on the positive side. Therefore, have this called the functional for zeta and this is as I already said this is very important equation which will allow us to talk about zeta values in different context and we will keep coming back to this equation. It also very nicely relates zeta function with the gamma function. Now, coming back to this well the same equation or in fact if you go back to the previous one which I should write as like this and I already observed that this has exactly 2 poles at z equals 0 and z equals 1. So, let us using this let us find out all the poles of the zeta function over the entire complex plane because this allows me a definition of zeta function over the entire complex plane. We already know zeta z has a pole at z equals 1 and in fact that is a simple pole of order 1 and on the right hand side also we see a pole of order 1 at z equals 1. So, this seems to be fine you know that gamma z by 2 that is gamma half does not have a pole is not that does not diverge. So, it is everything is perfect what about z equals 0 the right hand side of the pole at z equals 0 does zeta have a pole at z equals 0 zeta 0 should be zeta 1. That is only for gamma function yeah exactly see gamma has a simple pole at z equals 0 and that matches with the simple pole on the right hand side therefore, zeta does not have a pole at z equals 0. If I cannot even have a 0 at z equals 0 because if it had a 0 at z equals 0 that will cancel out the pole at of gamma on the left hand side and therefore, you will not have a pole on the right hand side. So, this is all the conclusions from this are zeta z does not have a 0 or a pole let us move back these are the 2 poles on the right hand side which cause the poles or 0 on the left hand side poles actually on the left the right hand side has no other poles. So, which means whatever pole zeta has if at all it has they must cancel out with 0's of gamma, but does gamma have a 0 anywhere on the negative complex plane. In fact, if you recall that functional equation for gamma gamma z is equal to gamma 1 plus z over z. So, if gamma z is 0 then gamma 1 plus z must also be 0 which means gamma 1 2 plus z must be 0 3 plus z. So, that all points must be 0 all the way up, but at some point the real part of k plus z will become positive and then we know that gamma of that quantity is not 0. So, that actually said also that the gamma function is never 0 on the entire plane. So, if gamma function is never 0 on the entire plane it surely is not 0 on the negative complex plane and therefore, zeta has no poles on the negative. So, which means zeta has exactly 1 pole at z equals 1. Well, we can observe something more also here because gamma has some poles on the negative side. In fact, at all negative all negative integers it has a pole. It also has a pole at 0 you are right it has a pole at 0, but that is fine that pole already is taken care of, but it has a pole at minus 1 minus 2 minus 3 which means to get that pole in this equation we have to set z equals minus 2 minus 4 minus 6. So, all every negative even integer will cause a pole on the left hand side, but right hand side has no poles at those points which means zeta must have a 0 at those points to cancel out those poles and the order of what is the order of those poles of gamma say go to the order of pole of gamma at minus 1 it is order is 1. In fact, all of these poles have order 1 because the gamma minus 1 is gamma 0 over minus 1. So, it is inherits the order of the pole at gamma 0 and every subsequent one. So, all these poles of gamma are of order 1. Therefore, zeta must have a 0 at every negative even integer and these 0 must be of order 1. So, a simple 0 is same as a pole 0 of order 1 minus oh because there is z by 2 here is there any other 0 of zeta function on the let us say negative complex plane use what yes. So, use the functional equation there if there is a 0 on the say at z which is on somewhere on the negative complex plane then there will be a 0 corresponding. Now, gamma at those points is non 0 whether gamma z by 2 or gamma 1 minus z by 2 because we know gamma has no 0s and no poles also except for 0 minus 1 minus 2 which we have already taken care of at all other points at any other point if zeta z has a 0 then zeta 1 minus z also is 0. If that is negative so, that means if there is minus 1 here then this will become zeta 2 that zeta 2 is 0 and zeta 2 is 0 which actually pi square by 6. In fact, zeta z for any value of z with real part greater than 1 will not be a 0 because again that it is a convergent series and numbers is get added up except well there are amplitudes complex amplitudes which can subtract also. But the series sum one can argue a bit to see that it is never 0 on the side of real z greater than 1 which in turn means that it will have no 0 when real z is less than 0 is symmetric. Symmetric around real z equals half. So, if there is no 0 on real z greater than 1 there is no 0 on real z less than 0. In fact, that may give that as an assignment. So, by the symmetry well symmetries of values certainly holds for the 0s. If zeta z is half then zeta 1 minus z need not be half. But if zeta z is 0 then zeta 1 minus z must be 0 because of the way the equation is set up. So, therefore, since there is no 0 here 0 free region let us say that this is also 0 free except of course these minus 2 minus 4 minus x minus 8 and so on where the 0s are caused by the gamma function. So, apart from this 0s of zeta function and minus 2 minus 4 minus 6 minus 8 all other 0s if at all they exist must be in this region because gamma has a pole at those points. So, 0 and pole cancel each other out on the left one side and other side. So, the remaining 0s are in this trip between 0 and 1 and this is called critical strip of zeta function because the behavior of zeta function in this strip is something that we would like to understand why I will explain very soon. But that is where we have some very interesting behavior of zeta function. These 0s which are at negative even integers these are called trivial 0s of zeta function trivial because these are basically caused by poles of gamma function and they are not really of much interest to us. While they are of interest, but they do not really change the things in a any significant way as we will see later. So, with all of this we have at least achieved our one of the targets which was to define zeta function over the entire complex planes. So, that we can take a contour now I do not know if you remember the origin of all of this. We had psi x equals 1 over 2 pi i integral c minus i r to c plus i r zeta prime z over zeta z x to the z by z d z plus 1 over 2 pi i by z. So, we have to order x log square and this is how we started and we said let us evaluate this integral this is the error term to evaluate this integral we use this familiar technique of defining a domain and using the residue theorem Cauchy's integral formula essentially. But in order to use that one thing that became clear is that we cannot go on the right side because if you go on the right side since x is bigger than 1 x to the z will diverge and we will not be able to bound the integral this side. So, we have to come on the left hand side and look at this region and c was if you recall 1 plus 1 by log x just a little more than 1. Now, in order to do this domain integral we needed the definition of zeta function in this domain which we have now managed to achieve once zeta is defined in this domain and zeta is analytic also by this analytic continuation make sure that zeta is analytic everywhere except for the pole at z equals 1 and so zeta prime z is perfectly well defined everywhere. So, this function is defined well defined and we can now go ahead and do the integral. Now, in order to do the integral we will of course, invoke this theorem of Cauchy integral formula that integration along the boundary of a domain equals the or the residue theorem equals the sum of the residues at all the poles right inside the domain. So, what are the residues of this function this whole function that we have what are its residues in this region or forget the residues poles let us forget let us find out poles in this region one pole is very clear. Z equals 0 pole right here, but that and that takes here of this guy no other pole because of this the remaining poles are because of zeta prime over zeta what poles are caused by zeta prime over zeta will it have pole at z equals 1 zeta has a pole, but there is 1 over zeta prime over zeta think about this see zeta has a pole at z equals 1 it is a simple pole. So, if you look at the Lorentz expansion around z equals 1 for zeta you will get something like 1 over z minus 1 plus higher degree term differentiate this what do you get you get minus 1 over z minus 1 whole square plus higher degree terms. In fact, the higher degree terms will only be constant and higher there will be no term like 1 over z 1 over z minus and then you look at zeta prime over zeta.  So, the denominator becomes a polynomial or a power series numerator still has 1 over z minus 1 plus a power series now at z equals 1 what happens pole same order pole order 1 pole at z equals 0 1 upon z is not there zeta zeta is not 0 or does not have a pole or a 0 at z equals 0. In fact, this character zeta prime zeta is a pretty bad character because whenever there is a pole of zeta or there is a 0 of zeta this becomes a pole. One simple way of seeing this is that zeta prime over zeta is no no it does. So, let us look at so it is very forget about zeta take any function just consider let us say some function m z with pole of order k at z is 0. So, let us will just assume this as a pole at 0. So, this means f z is 1 over z to the k not 1, but it is some constant c c over z to the k plus higher degree terms what is derivative of f it is minus c k over z to the k plus 1 plus higher degree terms. So, f prime z over f is minus c k over z to the k plus 1 plus higher degree term c over z to the k plus higher degree term multiply and divide by z to the k we get minus c k by z plus higher degree term c plus higher degree term. Now, this at z equals 0 is a pole, but is a pole of order what is the residue at this pole residue is calculated by multiplying it with z and taking the limit as z goes to 0. You multiply the whole thing by z take the limit as z goes to 0 you get minus c k over c.  So, what happens to f prime z c k z to the k minus 1 plus higher degree term.  So, this as a pole at z equals 0 of order 1 and what is the residue. So, f prime over f for any function f has this very nice or strange property if you will that whenever f has a 0 or a pole f prime over f has a pole of order 1 and the residue is precisely the order of the 0 or pole where the order of pole is taken in the negative sense. So, that is the knowledge we have now coming back to zeta prime over zeta which is one instantiation of f prime over f we have to now worry about every single pole and 0 of zeta function. So, well surely we know that here is a pole at z equals 1. So, that is going to be a pole of zeta prime over zeta, but not only that minus 2 m minus 4 m minus minus 2 minus 4 minus 6 these are all 0 of zeta function therefore, poles of zeta prime over zeta, but not only that all the 0's wherever they are in this critical strip and we have no idea how many of where they are and how many of them are they are also poles of zeta. So, in order to be able to estimate what this integral is we will need to do a lot of work now this part is easy minus 2 minus 4 minus 6 very clean we know it is a we know the residue, residue is because these are poles no these are 0's of order 1. Therefore, residue at each one of them is 1 simple this is again 1 also we know it is a pole of order 1. So, therefore, residue is minus 1 these are the characters which we really need to understand these 0's here we need to get a handle on where they are how many of them are there. So, that we can calculate the residues the right number of residues appropriately the residues we can only we can calculate easily by just knowing how many of them are there, but there is there is a reason why we need to know exactly where these guys are and the reason is the following that as you take the integral see that strategy is going to be that we take this contour integral anticlockwise and we will argue that this integrals are very small and therefore, can be absorbed in the error and. So, this contour integral is roughly same as the integral this one this integral and therefore, we get psi x not to argue that these contour integrals are very small or this path integrals are very small we will have to be careful as we move along say from here to here we may be coming close to a 0 of zeta function that is where it will be because here we know exactly where are the 0's we will can avoid them by going far away from there and also come and come down of course, we cannot avoid them by too much, but we can certainly split them right in the middle. So, distance 1 this side distance 1 this side so reasonably far apart, but here we have to have some control over taking this path otherwise if this comes too close to a 0 what happens this person diverges or it becomes very large as we move the integral becomes large and then we cannot argue that the integral along this line is small. So, that is why it is important to know the locations of these 0's also. So, that we can avoid the 0's as we move from right to left. So, we need to know the numbers we need to know the locations and then we can say something useful hopefully about the contour integral and therefore, we can conclude something useful about psi function. So, that is the task I wrote us any questions or zeta prime over zeta has a pole at that point. So, as if you this path goes very close to a pole or a 0 of zeta function which is a pole of zeta prime over zeta then the integral will shoot up very close. So, we have to define what very close is it becomes essentially we want to avoid a situation where when this function takes a very high value along some point on the path integral path right. Other takes a very high value then of course, we cannot argue that the whole integral is small. So, that is the situation we have to avoid. So, we cannot just blindly take a no pick a point here and just move to the left. We might even be hitting a pole if you as you move along and then the whole integral is identified. So, that is as I said is the task I had of us and we are now it sort of tells us that we have to analyze this distribution of zeros in order to get a handle. But let us assume wherever those zeros are. So, let us say we can at least write down this suppose. So, let us use a symbol rho which I will uniformly use to represent zeros of zeta function in that critical strip. So, then what is this contour integral if you recall that this is the domain d there is a negative sign also. So, this is the negative what is the value of this integral by residue calculus it equals the sum of the residues at all the poles. So, what are the poles here poles are of course, at one order of zeros I am not sure I think we can say something, but that is not very important for us because zeta prime or zeta will always have a order 1 pole only the value of the residue will change value of residue will change. But what we can say is we just let rho run over all zeros if the order is k then let we can sort of pretend that they are k 0 sitting at the same point. So, as rho runs over all zeros it runs over k times over that. So, this equals the sum of residues at all the poles. So, first let us take care of the poles that we know well what is the residue as the pole when z equals 1 zeta prime over zeta takes the value minus 1. So, minus zeta prime over zeta will take the value plus 1 and, but notice that the residues of the whole function not only this is this entire function we are considering at its poles. So, what is the residue of this at z equals 1 x then moving back z equals 0 is pole of this. Now, the residue of this therefore, is minus 1 because of this being a pole and this will then be zeta prime 0 over zeta 0 as the pole residue. Then moving further back at minus 2 minus 4 minus 6 what is going to be the residue. This will give always a minus why would there be a minus the pole is pole will give a residue of minus 1 no going back to minus 2 for example, minus 2 is a 0 of zeta. So, its residue will be plus 1 zeta prime over zeta and since there is a minus here there will be a minus 1 here and this would be minus x square by 2 minus x to the 4 by 4 and so on. So, these are the residues corresponding to the 0s at the trivial 0s and then there would be residues corresponding to non-trivial 0s within the critical strip and what about there. So, there will be 0. So, its residue will be plus 1 it is minus 1 here and this would be x to the. So, let us just write this as you are right and there will be a minus here. So, that is the formula we get we will do it next time.