{"id":9682,"date":"2023-05-08T09:02:27","date_gmt":"2023-05-08T13:02:27","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=9682"},"modified":"2023-05-08T09:02:27","modified_gmt":"2023-05-08T13:02:27","slug":"get-invisible-design-an-invisibility-cloak-using-matlab-and-simulink","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2023\/05\/08\/get-invisible-design-an-invisibility-cloak-using-matlab-and-simulink\/","title":{"rendered":"Get Invisible! Design an Invisibility Cloak using MATLAB and Simulink"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><\/div>\n<p><em>In today&#8217;s post, Maitreyee Mordekar joins us to talk about designing an invisibilty cloak. Over to you, Maitreyee..<\/em><\/p>\n<div><\/div>\n<div><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Let\u2019s get ready to design an invisibility cloak illusion! In this blog, we will go over the process of implementing an illusion of an Invisibility Cloak using a simple image processing technique of color-based thresholding and segmentation. The solution implements the concepts of performing image segmentation and analysing the regions of interest using interactive apps. At this point, I solemnly swear that I am up to no good \ud83d\ude09<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 572px; height: 323px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_1.gif\" alt=\"InvisibilityCLoak.gif\" width=\"572\" height=\"323\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 1: Showcasing the Simulink model<\/span><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Unlocking the Algorithm (Alohamora Algorithm)<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The illusion works on the concept of color-based segmentation and image multiplication. For all of you who are looking for the magical invisibility cloak, it is located <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/103830-invisibility-cloak-using-matlab-and-simulink\"><span style=\"text-decoration: underline;\">here<\/span><\/a> (Don\u2019t be disappointed to find just the code and not a cloak here \ud83d\ude09 ).<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The algorithm multiplies a colour thresholder mask to a pre-configured background image to display the background in the coloured cloak area giving an illusion of invisibility. If the above sentence was a little overwhelming to understand, don\u2019t worry. We will go over this step by step!<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The illusion of creating an invisibility cloak has 3 parts:<\/div>\n<ol style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Setup of the Background Image<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Tune the foreground color (aka creating our invisible cloth)<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Manipulate the image from the camera video stream<\/li>\n<\/ol>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">1. Setup of the Background Image<\/h3>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The very first step would be to for us to capture a background image with a stationary camera and a stationary background. For this, we would have to ensure that we have a camera connected to our system and have the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/45182-matlab-support-package-for-usb-webcams\"><span style=\"text-decoration: underline;\">MATLAB Support Package for USB Webcams<\/span><\/a> installed. Then we set it up using the following command in the MATLAB Command Window:<\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #bfbfbf;\"><span style=\"white-space: pre;\">cam = webcam;<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Once the camera is setup, we take a snapshot of the background and save it into the MATLAB Workspace. Let\u2019s say following is the image that is captured.<\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #bfbfbf;\"><span style=\"white-space: pre;\">backgroundImage = snapshot(cam);<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 361px; height: 267px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_2.png\" alt=\"\" width=\"361\" height=\"267\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 2: The background image<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Save this as <span style=\"font-family: monospace;\">backgroundImage.<\/span><\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #bfbfbf;\"><span style=\"white-space: pre;\">save(<span style=\"color: #a709f5;\">&#8216;backgroundImage&#8217;<\/span>,<span style=\"color: #a709f5;\">&#8216;backgroundImage&#8217;<\/span>);<\/span><\/div>\n<\/div>\n<\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">2. Tune the Foreground Color<\/h3>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Now, we must tune to detect and segment colors from the cloth that we would like to use as our invisibility cloak. For this example, we are using an orange object.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Let\u2019s detect the colors of the orange object using the <a href=\"https:\/\/www.mathworks.com\/help\/images\/ref\/colorthresholder-app.html\"><span style=\"text-decoration: underline;\">Color Thresholder App<\/span><\/a>.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 370px; height: 265px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_3.png\" alt=\"\" width=\"370\" height=\"265\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\">Fig 3: Tuning the orange-colored foreground<\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #bfbfbf;\"><span style=\"white-space: pre;\">colorThresholder<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">You can use the image with the colored object in the App and adjust the sliders to detect only the orange color. You can <span style=\"font-style: italic;\">export<\/span> the detected color mask and then use it in Simulink.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 521px; height: 293px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_4.gif\" alt=\"Threshold.gif\" width=\"521\" height=\"293\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 4: Segmenting the foreground color using Color-Thresholder App<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Also, if there are regions falsely detected as the cloak color, you can refine the detected mask using <a href=\"https:\/\/www.mathworks.com\/help\/images\/ref\/imagesegmenter-app.html\"><span style=\"text-decoration: underline;\">Image Segmenter App<\/span><\/a>.<\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #bfbfbf;\"><span style=\"white-space: pre;\">imageSegmenter<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The white pixels represent the areas that are detected as <span style=\"font-style: italic;\">orange<\/span> and the black are areas that are detected as <span style=\"font-style: italic;\">not orange. <\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 363px; height: 258px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_5.png\" alt=\"\" width=\"363\" height=\"258\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 5: Segmented, orange-colored object<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">To understand the implementation in detail, you can watch the video on <a href=\"https:\/\/www.youtube.com\/watch?v=-bYKl64vpGY\"><span style=\"text-decoration: underline;\">Making Vehicles and Robots See: Image Segmentation and Analysis<\/span><\/a> that introduces the concepts of performing image segmentation and analysing the regions of interest using interactive apps.<\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">3. Image Manipulation of the Camera Video Stream<\/h3>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The above two steps were carried out to setup the system by using the MATLAB Command Window. This step is the image manipulation to help us get the illusion will be performed using Simulink. Here, our foreground is the orange-colored object, and the background is everything else in an image.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The method adds up two images which are separate from each other that eventually leads us an illusion of invisibility.<\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Revealing the background (Revelio Background)<\/h4>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">In the first image, we take the background and multiply it with the orange-colored object mask. That leaves us with an image which has the background image at the region of the image frame which had the orange object. The rest of the image would have pixels which are black (i.e. a pixel value of 0).<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 562px; height: 293px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_6.png\" alt=\"\" width=\"562\" height=\"293\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 6: Algorithm for revealing the background<\/span><\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Obscuring the foreground (Obscuro Foreground)<\/h4>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">For the second image, we manipulate the streaming input video to stream everything except the part of the image which we have in Image 1. For this, we work with an operation that is an inversion of the mask that we used in the last image. We use the not operation so that the 0s in the image become 1s and vice versa. We finally multiply this image with the incoming video frame.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 523px; height: 300px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_7.png\" alt=\"\" width=\"523\" height=\"300\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 7: Algorithm for obscuring the foreground<\/span><\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Adding the Images (Confirmarum Images)<\/h4>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The last step is to add the two images together. Here, we add the foreground and the background images to give us the invisibility cloak illusion.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 499px; height: 339px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_8.png\" alt=\"\" width=\"499\" height=\"339\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 8: Adding the background and foreground images<\/span><\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Final Simulink Model<\/h4>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Now that we have understood the algorithm, the next step is to configure it all and run it to become invisible. You can find the models in <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/103830-invisibility-cloak-using-matlab-and-simulink\"><span style=\"text-decoration: underline;\">this File Exchange submission<\/span><\/a>.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 609px; height: 263px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_9.png\" alt=\"\" width=\"609\" height=\"263\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Fig 9: Final Simulink model<\/span><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Assumptions<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Now, the big question is, at what instances does this algorithm work \u2013 what have we assumed? This is a simple algorithm that performs color thresholding. We assume that:<\/div>\n<ol style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The web camera is stationary<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The background of the image is stationary does not have any moving objects<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The lighting conditions do not change<\/li>\n<\/ol>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Do check the example out to have some fun with image processing and make yourself invisible \ud83d\ude42 . Mischief managed!<\/div>\n<\/div>\n<p><script type=\"text\/javascript\">var css = ''; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script><a href=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8.mlx\"><button class=\"btn btn-sm btn_color_blue pull-right add_margin_10\">Download Live Script<\/button><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/05\/23MAY8_1.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>In today&#8217;s post, Maitreyee Mordekar joins us to talk about designing an invisibilty cloak. Over to you, Maitreyee..<\/p>\n<p>Let\u2019s get ready to design an invisibility cloak illusion! In this blog,&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2023\/05\/08\/get-invisible-design-an-invisibility-cloak-using-matlab-and-simulink\/\">read more >><\/a><\/p>\n","protected":false},"author":183,"featured_media":9652,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,8],"tags":[401,88,220],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9682"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/users\/183"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=9682"}],"version-history":[{"count":12,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9682\/revisions"}],"predecessor-version":[{"id":9718,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9682\/revisions\/9718"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/9652"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=9682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=9682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=9682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}