JADAK VIDEO: Clarity Machine Vision Software – The Color Detection Plug-In – Part 1 and Part 2

This video demonstrates JADAK’s Clarity Machine Vision Software Color Detection Plugin. Find out why JADAK machine vision is used by more medical device companies and OEMs than any other vision provider.

*Want to learn more about JADAK’s Medical Machine Vision Platforms and Services?  Register for a Tech Consultation Day from the experts at JADAK! Also, be sure to visit our RFID Products and Services,  Barcode and Machine Vision pages.

 

Below is the video transcript.

Clarity 2.0 Machine Vision Software

Color Detection – Creating and Using the Scripts

 

In this video we’re going to demonstrate the color detection tool that is included in Clarity 2.0. What you’ll notice in this video is how easy it is to get it up and running, to train the camera to look for specific colors, and how easy it is to employ this tool on JADAK’s smart vision cameras.

In this demonstration I’m going to program the cameras to look for two different cap types. I want it to be able to differentiate between green or red in this case. In many clinical analyzers, the cap color will determine the different kinds of tests that are going to be required. So in this video, I’ve already acquired an image of a test tube here with a green cap on it. And so the first step that you’ll do is select the Color Detection tool from the toolbar up at the top. You’ll see the color match tool will then appear in the Step List here on the left. So the very first thing you’ll want to do is to train the camera to look for a specific type of color, to tell that camera that the certain color is going to be identified, and either therefore acceptable or not acceptable.

You’ll need to click the Train Colors button here [bottom below image] and when you do that it’s going to bring up a pop-up window and within that pop-up window you’ll see a square region of interest. Use your mouse and the cursor to move that region of interest over the area you want to train to look for a specific color. Now I’ve used the bottom right corner of that square to extend and size accordingly. And I’ve highlighted the bulk of the green cap on this test tube. You can see the corresponding color appear under the matching dominant color bar on the right. And this is showing a dark green color, and what that represents is the majority of pixels that show up in my region of interest. In this case I want to train the camera to look for a green cap. Once I do that, click the Add Color button and you can actually double click on the label to type text for what you want to call that color on your script and have it be listed in the output once you ask the camera to look for a specific color.

I’m going to then click the close button and you’ll see at the top corner of your live image the region of interest you want to move to actually provide the analysis of color matching or color detection. In this case I’m going to put it similarly in an area over where the cap would be positioned on the test tube, and you can see that the border of the region of interest in this border turns green. So that is a live analysis to say that this is a color match from the color that we trained previously, as well as in the Step List over here that’s turned green, and you’ll notice that the output has actually included the text that we told it earlier when we called it a Green cap.

Down here in the Train Colors table, you can see the label we applied, the color that we’re looking at, and a measurement distance. It’s actually looking for a differentiation between between the color that we trained and the color that it’s seeing in the live picture. A number below five represents a good match, anything above a 5 will be rejected as not a color match.

Now I’m going to show you how we can train additional colors. If I remove that test tube and replace it with a test tube with a red cap, I can then acquire a second image. And once that image is acquired you’ll notice I have a test tube with a red cap. And the live image then analyzes this color to say it’s not a good match. The border of the region of interest then turns red, as well as my step output. But I’m then going to train the camera a second time in the same manner. I’ll click Add Color and apply a label, this time calling it “red.” Click the close button and notice that the distance between red is less than five, so I’m getting a success. Between looking for a green cap and a red cap, it says yes to the red cap and no to the green cap. So my output shows red versus the green.

You can download this script directly to the camera by selecting “send job to the device.” This will send the script to the camera itself. And you can run in a mode where the camera looks images directly, without Clarity running on a laptop.

In this example I’ve showed you how you can train Clarity to look for two specific color types. Of course we can program it to look for several more, using the same method I showed you earlier. Once the job is then uploaded to the camera, JADAK’s smart camera will operate independently looking for the specific color types that you’ve trained.

Hopefully this example has shown you how easy it is to employ color detection and train a JADAK smart camera using Clarity 2.0.

Color Detection Plug-In Video 2

JADAK’s machine vision cameras are capable of many different machine vision processes. In this video I’ll demonstrate another color detection tool included with Clarity 2.0 known as the Color Pixel Count tool. The Color Pixel Count tool will be appropriate, for example, when looking to detect a range of colors within an image. I’ve acquired an image here of a litmus strip type test, but this might be a blood or urine strip where a lab may be looking for a color or shade of various colors.

Using Clarity’s machine vision can result in eliminating errors associated with the visual inspection reliant on an individual. After an image is acquired, select the color detection tool at the top, and down below use the drop down box to select Color Pixel Count under type. You’ll notice an RGB wheel appears and you can use these tools to set values for hue, saturation, value and brightness. Use the cursor to move the region of interest you want to test. In this test I’ll be examining one of the squares in the resulting test area to measure its color within a range. You’ll notice that this records the number of pixels that fall within this acceptable range, in this case around 32,000.

I’m going to increase the saturation slightly and because I only want to include all of the red colors and reject the green colors, I’m going to adjust my passing range criteria to be between 10,000 and 40,000 pixels. As a result, under my step list, my tool has turned green and I’m accepting that number of pixels within my color wheel down below. In other words, the red color here is passing. If I clone this step and perform the same color analysis for the color directly next to it, which in this case is green, you’ll notice the result is only about 140 pixels, which is being rejected by the analysis that I set in the passing range criteria. So in essence, it’s passing the red color but rejecting the green.

I’ll set up one more color analysis area to measure the sample well area and make sure that it’s within an acceptable color range. In this case I’ll look for something that’s around a yellow-orange inclusive color range. So I’ve shown here how this area will pass with an acceptable number of pixels within that yellow-orange range. If for some reason this sample well registered something different, for example blue, then it would be rejected by Clarity’s color analysis tool.

From here you can save the script or click on device and save the job directly to the camera by clicking on device, and send job to device.

Check out our other videos to learn how to configure the output tool, to configure the camera to determine how to respond to each one of these criteria.

This concludes the video for Color Detection tool. Check out the other videos on Clarity 2.0.

 

News & Resources

JADAK’s “Reagent Authentication with RFID” – Webinar Recording

In today’s rapidly changing medical testing environment, laboratory processes are

October 17, 2017

EMS Inventory Management using RFID

From gaining up to 40% efficiency to cutting costs by

October 13, 2017

NFC HF in In-Vitro Diagnostic (IVD) Device

This case study details how JADAK’s Near Field Communication (NFC) High

September 14, 2017