See and sort see-through plastics

A systems integrator combined a special lighting technique, a specific camera-acquisition mode, image processing in color space, and a well-synchronized rejection device to create a new machine vision solution.

Vision SystemBy Charles Magnan, Averna Vision & Robotics Inc.


RECYCLED PLASTIC is only as pure and profitable as its sorting and presorting processes can make it. So, plastic recyclers and their operations must precisely separate plastic by category because the purity of each group (PETE, PVC, PP, etc.) correlates directly to revenues. Because these processes and their products often aren’t consistent, however, added personnel usually are needed to do manual sorting.

Though this means automation has an opportunity in many recycling applications, technological limits and costs have restricted its adoption. “Existing automation techniques for plastic sorting include using X-rays and infrared spectrometers,” says Sebastien Parent, principal engneer at Averna Vision & Robotics Inc., a system integrator in Montreal. “The advantages of these techniques are that they can determine the nature of a plastic by its signature in the wavelengths at a molecular level. However, these technologies are complex and expensive.”

A Visual Opportunity
The benefit of using machine vision in the visible light domain is lower cost and that it can use standard machine-vision algorithms. To develop an inexpensive, automated sorting system for clear/transparent polyethylene terephthalate (PETE) plastic with machine vision, our company recently combined a special lighting technique, a specific camera-acquisition mode, image processing in color space, and a well-synchronized rejection device to create a solution, which would operate at 40 images per second.

Averna's Automated Sorting System
Averna’s automated sorting system identifies transparent plastic, and coordinates with 20 air nozzles to blow identified bottles into a bin.

Sorting Out Sorting 
This request for Averna’s vision system came from one of our existing clients, a large plastics recycling facility in eastern Canada, which collects material from all over the nation’s eastern provinces. This recycler takes in plastic that’s already been partially compacted and sorted, and had used three people to further presort it, mostly to separate transparent from opaque plastics. Thorough inspection and sorting is vital because PETE plastic can be recycled many times only if it maintains high purity. The team works on a line that moves at about 40 ft/min, and processes about 5,000 lbs/hr of plastic bottles with a 5-10% error rate. This facility required a more automated presorting system to improve accuracy, and also needed to smooth some peaks in its operating schedule.

“We developed a Bottle Sorter and Inspection system that could go as fast as the recycler’s other equipment, and do a good enough job that the facility’s staff could be redeployed in other areas,” says Parent. The vision-based system was developed nine months ago, and installed six months ago.To achieve low-cost automated plastic sorting, Averna selected National Instruments’ (NI) hardware and software tools to ensure quick testing, efficiency, and robustness. “The new system uses a high-resolution camera and NI’s vision builder software, computer, and I/O cards,” adds Parent. “These tools helped us develop and fine tune our new inspection system in about half the time it takes to build a traditional vision system, and it only cost about one-third as much as a typical $200,000 vision system.”

Coordinating Vision and Actuation
The plastic parts to be sorted arrive via an in-feed conveyor, which drops bottles in front of a camera looking at a specially designed backlight. As long as no plastic, labels, or opaque plastic blocks the lighting, the camera acquires no information. However, as soon as a translucent plastic comes between the camera and the lighting, it’s detected by the inspection system, which activates the sorting process. When the system detects a piece of colorless PETE plastic, a series of 20 coordinated air valve/jet nozzles fire to push that item into a different recycling bin. Other material types, such as colored PETE, opaque plastic, labels, and non-PETE, fall onto an output conveyor without disturbing the drop path (see sidebar).

The challenge for the new vision-based sorting system was to perform its required tasks in the time available to ensure 100% plastic inspection. The conveyor’s speed is 4.5 ft/sec, but the speed of the plastic parts is around 9 ft/sec due to added acceleration caused by gravity. “To accurately handle these falling items, the system must process 40 images (64 x 640 pixels) per second in a 2.8 in. high x 28 in. long field of view with a resolution of 0.044 in. per pixel,” says Francois Vachon, Averna’s vision system developer. “At the end of each process, the system applies rules to decide which air nozzle to open.”

To achieve the needed image acquisition rate with the selected field of view, we selected a CMOS color camera from PixeLink that increases frame rate by “windowing” the sensor. This method focuses on a small area in the view field to increase the acquisition rate, and get a more optimum per second image flow. “Synchronization was a challenge, but we now can trigger more than one nozzle if a bottle shows up in two images if it isn’t falling as fast as the others,” says Parent. “To help distinguish transparent plastics from others, we altered our system’s lighting to use the differences that occur when light passes through transparent plastic.”

In addition, this sorting system also retains fail-safe logic. The goal was to have the PETE non-color product 100% pure in the recycling bin. More tolerance is given on the color and non PETE product because it’s still sorted manually on the next  conveyor. However, while 80% of the recycler’s transparent plastic used to come before the operators, they now see only 20% of the transparent plastic, which further decreases errors.

To implement our software, we used the vision software as a prototyping and testing platform for processing time evaluation and selection of algorithms. We also used NI’s Vision Assistant software for filtering tests, and translated the NI’s Vision Builder sequence in a LabView virtual instrument. “By using NI’s software, we were able to go from rough configuration, get deeper into the system, do more fine tuning faster, and develop a configurable platform for our system much more quickly,” adds Parent. “This also meant we could configure the system for vision inspection more quickly because we already had algorithms in place, and we didn’t need to debug them. If we hadn’t used NI’s software, we would’ve had to develop a whole new application with programming language from scratch. This likely would have required another 300-400 hours of programming, and would have boosted the project’s price tag by $50,000.”


Analysis for Sorting by Vision


To inspect and sort PETE plastic bottles fast enough for its recycler client, Averna needed to have the maximum image processing tools available in the 25 ms time allowed for each image. The company used National Instruments’ Vision Builder to determine its analysis strategy in four major steps:

  1. Image acquisition. Using the windowing functionality of the camera and an exposure time of 1 ms, the acquisition time is 2.3 ms per image.
  2. Thresholding. The second operation performs two thresholds on the acquired color image. A first threshold keeps only the white information. Another threshold extracts all color information. To perform these thresholds, Averna works in the HIS color space, which gives a more realistic view of product variation. The white information could be darker or clearer and still be considered PETE non-color plastic. The processing time of each of these two thresholds is 7.1 ms.
  3. Pixel count. Once the white and color information is extracted from the initial image, the system performs a compilation by rejection zone. The two thresholded images are then separated in 20 equal areas of 64 pixels height by 32 pixels width (2.8x1.4-in areas). The operation performs a pixel count for each of these nozzle areas. To save processing time, the system can open all image buffers at the initialization stage to save the time allocated for this task. To implement this feature, Averna made a counting-pixel algorithm with LabView instead of using the Count Pixel VI from Vision Builder. We gain a factor two in processing speed (0.148 ms instead of 0.270 ms).
  4. Logic for rejection. Using the result of pixel summation for the two images, comparison-logic software determines the air valves to activate. This code keeps a fail-safe strategy for the plastic sorting. The air nozzles are kept closed around color plastic, even if PETE non-color plastic is present.

The response of the air nozzle is faster, and the rejection equipment to the visual inspection area is closer. Averna  then minimizes the risk of plastic position variation during falling path, which can cause product mixing. Even if the I/Os’ activation is performed in parallel with the program, to ensure an optimum activation speed, we perform a port output access instead of a line output access.

In addition, the solution uses LabView image acquisition algorithms to optimize the performance in the available processing time limitation. The final result is half the price of other standard solutions.


  About the Author
Charles Magnan is sales and marketing VP at Averna Vision & Robotics Inc. He can be reached at (514) 842-7577, by e-mailing, or via the company’s website at

Free Subscriptions

Control Design Digital Edition

Access the entire print issue on-line and be notified each month via e-mail when your new issue is ready for you. Subscribe Today. E-Newsletters

Biweekly updates delivering feature articles, headlines with direct links to the top news stories that are critical to staying up to date on the industry — company news, product announcements, technical issues and more. Subscribe Today.