Welcome to Kunshan EEK Automation Equipment Co., Ltd.
Home/ Solutions/Food Industry Inspection: Foreign Objects and Quality

Food Industry Inspection: Foreign Objects and Quality

Vision inspection for food production: foreign object detection, shape and count checks, packaging integrity and label verification, wet or dry product.

This Category positioning

In-line machine vision inspection of food product appearance, size and shape, color and surface, production process and packaging

Solution Category · 05
Quick answers

Solutions in this category are aimed at food manufacturers and configure the appropriate visual inspection method according to the shape, material, color, surface texture and production cycle time of different foods, covering Food product appearance, Dimensions and Form, Color and surface condition, Production process status, Packaging Stage five directions, and connects through visual inspection software with the PLC, the rejection mechanism and data systems to form an online inspection closed loop from imaging and judgement to automatic rejection and data traceability.

In food industry visual inspection, the first hurdle is not the algorithm, but site conditions. The workshop needs washing, sterilization, and dust removal, so the equipment must be easy to clean and maintain, and its material, structure, and ingress protection rating must all be set according to the site's hygiene management regulations; this is entirely different from the requirements for placing a piece of vision equipment in an ordinary machining workshop. The equipment structure, lens and light source protection, and cable routing all need to be considered together during the solution design stage.

The second barrier is Inspected Object Form. Food items are irregular in shape, naturally vary, are often stacked or occluded, and their surfaces may be wet, oily, or highly reflective. Solutions therefore usually need singulation (separating stacked items), single-file alignment (stabilizing the inspection pose), and two-sided imaging, with illumination designed specifically for the surface characteristics. Products such as biscuits and potato chips also have Thin, brittle, light, irregularly shaped, which requires solving high-speed conveying, random orientation and overlapping at the same time.

The third barrier is Judgement and Traceability. For food, "conforming" is often tied to hygiene and safety: the critical size of foreign matter, the allowable range of appearance defects, and the distinction between normal baking texture and genuine defects all need to be quantitatively defined together with the quality control department; how NG products are handled (rejection, diversion, re-inspection, sample retention) must also be aligned with the on-site process, and inspection images and results need to be kept on file to support quality analysis.

Complete food appearance visual inspection equipment: stainless steel frame with conveyor belt, inspection cabinet and touch screen
Complete food appearance visual inspection equipment: stainless steel frame + conveyor belt + visual inspection cabinet, with an industrial touch screen and operating buttons on the front of the cabinet and a rejection and diverting structure at the discharge end. The complete machine structure is designed to meet the cleaning and protection requirements of a food production environment.

inspection Pain Points

Why Food Production Lines Should Move from Manual Visual Inspection to Inline Visual Inspection

As food production lines move toward continuous, high-speed and automated operation, the traditional quality screening approach based on manual visual inspection faces challenges in inspection efficiency, judgement consistency and adaptability to production cycle time. These are concentrated in the following aspects:

Inspection Efficiency Cannot Keep Up with the Line Cycle Time

On a continuous production line, products pass at a fixed cycle time and manual labor can only sample-check or slow the line down, so 100% piece-by-piece inspection is impossible, and abnormal products easily flow straight into the packaging process step.

Judgement Consistency Is Hard to Guarantee

Acceptance criteria for appearance defects rely on experience, and different shifts or operators may judge the same defect differently; gradual differences such as color depth and baking state are especially obvious.

Inspection Blind Spots on Front and Back Sides and Multiple Faces

During conveying only one face of the product is turned toward the camera, so defects on the bottom face, sticking and indentations are often not visible; inspecting only one side creates a permanent inspection blind spot.

Defect Data Cannot Be Accumulated

Manual visual inspection struggles to record defect type, position and quantity, leaving a lack of structured data usable for process improvement, supplier traceability and batch analysis.

Labor Cost and Job Stability

Prolonged visual inspection is highly repetitive and strenuous, and staff turnover directly affects the consistency of detection performance, especially during the peak-season capacity ramp-up.

Chain Effects Between Process Steps

If abnormal products are not intercepted, they continue into the packaging stage, causing a second waste of packaging material and labour and even creating batch-level quality risk.

Not all of the above pain points necessarily exist in a specific project. Before the project starts, the production line structure, product form, and existing quality standards must be taken into account to first confirm the problems that really need solving, and then define the inspection scope.

Core Technical Solution

Broken down by "industry × product × inspection issue" into five combinable inspection directions

Food visual inspection is not suited to a simple split such as "one solution for candy, one for biscuits"; it is better to divide it by The process step where the inspection object sits divided into five directions. Each direction corresponds to a relatively fixed set of inspection scope and imaging approach, and an actual project is usually a combination of two or three of them.

① Food Product Appearance Inspection

Addressing the product's own surface and shape condition.

  • Defects · scratches · cracks
  • Missing corners · damage · deformation
  • Discoloration · stains · foreign matter
  • Bubbles · Holes · Forming anomalies

② Food Dimension and Shape Inspection

Addresses the product's geometric parameters and shape integrity.

  • Length · width · thickness · diameter
  • Outer contour · area · roundness
  • Height · Flatness
  • Shape integrity · edge integrity

③ Food Color and Surface Condition Inspection

Targets the state of color and coating layers, closely related to baking and coating processes.

  • Baking color · color difference · scorch marks
  • Appearance differences in doneness
  • Surface texture · frosting
  • Sugar coating integrity · chocolate coating · film coating integrity

④ Food Production Process Inspection

This targets the presence state and arrangement state of products on the production line.

  • Presence/absence · missing part · wrong part
  • Count · arrangement · spacing
  • Pose · Positioning
  • Sticking · Stacking

⑤ Food Packaging Visual Inspection

What is inspected is not the food itself, but whether the food has been packaged correctly.

  • Packaging bag presence/absence · seal inspection
  • Bag opening integrity · wrinkles · missed sealing · broken bags
  • Label presence and position · inkjet coding · date
  • Barcode · QR code · bag count

⑥ Integrated Inspection Platform for Food Production Lines

The first five directions are abstracted one level up to address the whole production line rather than a single food product.

  • Product vision: appearance · color · dimensions · shape
  • Production process: presence/absence · arrangement · count · sticking
  • Packaging vision: sealing · labels · characters · barcodes
  • Algorithms and execution: AI algorithms · automation · data
Biscuits pass the visual inspection station in multiple lanes on the conveyor, with the inspection mechanism and light source above
Online inspection station: products pass through the visual inspection area in multiple lanes on the conveyor, and the inspection mechanism above performs image acquisition; suited to continuous online screening of baked products.
Multi-station inline inspection mechanism, with a gantry crossbeam and line light source above the conveyor belt
Multi-station inspection mechanism: a gantry beam carries the camera and line light source and spans above the conveyor, with safety guarding, for stable imaging under high-speed continuous conveying.
The five directions can be implemented independently or combined into a full-line inspection platform. In a specific project, first confirm Inspection Objects and Must-Check Defects, and then decide which of these directions to adopt.

inspection Scope

What can be inspected in each of the five directions

Inspection DirectionCovered Inspection ScopeImaging and Algorithm Focus
① Body AppearanceChipped corners, damage, cracks, edge chipping, fractures, surface dents, bubbles, holes, stains, surface foreign matter, deformation, incomplete formingDefect size and contrast determine resolution; defects with complex shapes favor AI recognition
② Dimensions and FormLength, width, thickness, diameter, height, outer contour, area, roundness, flatness, shape and edge integrity, local corner loss, contour deviationCalibration is required first; tolerances and judgment ranges are defined by the customer drawing or quality standard
③ Color and surface conditionOverall color abnormality, locally too dark / too light, uneven bake color, scorch marks, abnormal color patches, color difference between products, surface texture, frosting, sugar coating and film coating integrity, chocolate coating conditionRequires stable lighting and color calibration; a reasonable color difference tolerance must be established first
④ Production process statusProduct presence/absence, missing placement, double placement, overlap, sticking, abnormal arrangement, abnormal spacing, abnormal pose, count, positioning, jamming and conveying anomaliesTarget positioning and segmentation capability; touching or overlapping parts require an assessment of segmentation feasibility
⑤ Packaging StagePresence of packaging bag, seal integrity, whether the bag opening is intact, wrinkles, missing seals, torn bags, label presence and position, inkjet codes, production date, shelf life, batch, barcode, QR code, fill volume / bag countTransmitted or side illumination depending on the packaging material; can be combined with OCR and code reading
The table lists solutions in this category Commonly Covered Inspection Scope, which does not mean that all of them are enabled in any given project. The specific inspection items, acceptance criteria and thresholds must be confirmed individually in combination with the product drawing, samples and quality requirements.

inspection Object

Ten product directions divided by food category

Product forms in the food industry vary widely, and the same "appearance inspection" has different imaging difficulties and inspection priorities across categories. The table below organizes ten product directions that can be planned independently by category, each with a different inspection focus:

Product OrientationTypical Food ProductsCore Inspection Items
01 Candy visual inspectionHard candy, gummy candy, lollipops, filled candyAppearance, color, form, both sides
02 Biscuit visual inspectionBiscuits, cookies, wafersCracks, missing corners, color, dimensions
03 Chocolate Visual InspectionChocolate, chocolate blocksChipping, surface, form, color
04 Bread and Pastry Visual InspectionBread, cakes, egg tartsShape, baking, defects
05 Nut visual inspectionPeanuts, sunflower seeds, almonds, mixed nutsColor, damage, foreign matter, dimensions
06 Potato Chip and Puffed Food InspectionPotato chips, shrimp crackers, crispy riceDamage, scorch marks, color, form
07 Fruit and vegetable food inspectionFruit, vegetables, fresh-cut foodAppearance, color, rot, dimensions
08 Granular and Block-Shaped Food InspectionJelly, candied fruit, soy products, etc.Presence/absence, color, form, foreign matter
09 Food packaging inspectionBagged, boxed, bottledPackaging, sealing, labels, printed codes
10 Comprehensive Food Visual InspectionAutomated food production lineAppearance + dimensions + packaging + traceability

The conveying and imaging structures differ markedly between directions. Single-file conveyed products (candy, biscuits, chocolate) suit fixed-pitch piece-by-piece inspection; bulk products (nuts, granules, chunks) usually use Vibratory bowl or conveyor spreading + high-speed area-scan / line-scan + AI classification + air-blow sorting approach, so that pieces are identified one by one, classified one by one and rejected one by one; for packaged products, images need to be taken at a station after packaging, taking into account the light transmission properties of the packaging material.

Typical defect

Which defects and anomalies these types of solutions mainly address

Defect TypeTypical ManifestationsInspection Focus Points
Incomplete OutlineChipped corners, chipped edges, fractures, incomplete forming, damaged edgesRegular shapes can be compared against a standard contour model; irregular shapes are better handled by AI
Surface CrackCracks, fine crazing, surface scratchesSuitable angle lighting is required to enhance texture and edge features
Color and BakingOverall color difference, local scorch marks, uneven baking, abnormal color patchesRequires stable diffuse illumination and color calibration, with the color difference tolerance set first
Surface ConditionBubble, dent, bulge, frosting, incomplete coating or film coatSurface structure determines whether side light or combined illumination is used
Foreign Matter and ContaminationHair, fiber, plastic, insects, oil stains, dust, foreign particlesLow contrast when the color matches the product; often requires multispectral imaging or a dedicated background
Sticking and AlignmentBottom sticking, product sticking, overlap, stacking, abnormal spacingFirst clarify whether anomalies are rejected directly or re-inspected after sorting
Packaging DefectsBag breakage, missed sealing, sealing abnormality, wrinkles, label misalignment, unclear inkjet codesChoose transmitted / side light according to the packaging material; can be combined with code reading and OCR
Missing StatusPresence or absence, missing items, extra items, count mismatch, missing decorationsPositioning and counting algorithms can output position information at the same time
Some biscuit products naturally have baking texture, embossing, holes or regular patterns; these Normal Features It may produce an image appearance similar to cracks and focal spots. Therefore, during algorithm development, boundary samples between normal texture and suspected defects must be collected in sufficient quantity to reduce false calls caused by normal variation.

inspection Capabilities

What conventional vision and AI are each good at, and where the boundary lies

Not every food defect requires AI. For inspection items with clear rules, such as contour, dimension, color range, presence/absence, and count, conventional vision algorithms are usually easier to parameterize and easier to validate and explain; defects with complex forms, large variation in normal texture, or that are hard to describe with fixed rules are better handled with AI vision algorithms. In actual projects, the vast majority are Combination of Both.

Conventional Vision Is More Suitable

Inspection items with clear, quantifiable rules

  • Product positioning and segmentation
  • Outer contour, chipped corner, edge chipping, damage
  • Geometric quantities such as length, width, area and roundness
  • Color range and color difference judgement
  • Presence/absence, count, missing placement, arrangement and spacing

AI Vision Is More Suitable

Inspection items with complex shapes and large sample variation

  • Cracks and irregular damage
  • Baking anomalies and differences in doneness
  • Classification of complex surface defects
  • Distinguishing normal texture from suspected defects
  • Distinguishing between multiple defect categories

Confirmation Must Be Backed by Evidence

The following content makes no commitments that lack evidence

  • Smallest detectable defect / foreign matter size
  • Specific values for escape rate and false-call rate
  • Whether the inspection cycle time matches the production line speed
  • Detectability of fine cracks and slight baking differences
  • Feasibility of imaging solutions for transparent and translucent products

Limits That Require Separate Evaluation

These stages should not be assumed to be covered

  • Metrology-grade dimensional measurement (requires a separate accuracy assessment)
  • Foreign matter inside the product (within the scope of X-ray and similar equipment)
  • Metal foreign matter (within the scope of metal detectors)
  • Bottom and occluded faces (observation window or flipping mechanism must be evaluated)
  • Stuck or overlapping products (separation must be confirmed, or they must be arranged first)
Metrics such as inspection coverage, escape rate, false call rate and inspection cycle time, Must be jointly validated on the samples, quality standards and on-site production conditions confirmed by both parties before being written into the acceptance plan, and no estimated figures are promised in the early project phase.

AI vision algorithm

The algorithm chain from image acquisition to OK / NG judgement

Algorithms for food appearance inspection are usually organized as a fixed chain, with each step solving one class of problem and the software finally outputting a combined judgement:

  • 01 Product positioning: determining the inspection region of each product in the image, solving the problems of position offset, spacing variation and multiple products entering the field of view at the same time
  • 02 Target segmentation: separate products from the background, and assess the separability of touching or overlapping products
  • 03 Contour and geometric analysis: extracts the outer contour and calculates geometric parameters such as dimensions, area, roundness and contour deviation
  • 04 Surface and color analysis: gray level, color, texture, and zone analysis are used to identify anomalies with distinct image features such as stains, discoloration, and scorch marks
  • 05 AI defect recognition: build recognition models for complex defect shapes, completing defect extraction and classification
  • 06 Result fusion and judgement: merge the conclusions of each inspection item and output an overall OK / NG with the defect type

Typical AI Algorithm Tasks in Food Inspection

Object Detection

Each individual product is located within the field of view to establish an inspection object for per-unit judgement. It suits bulk material, multi-lane conveying and random product orientation.

Image Classification

Judge the class of the whole product or a segmented region, for example color grading, baking degree intervals and defect category attribution.

Instance Segmentation

Separates individual contours in densely stacked and touching scenes for count statistics and item-by-item defect judgement.

Anomaly Detection

The product's appearance baseline is learned from good samples, and regions deviating from the baseline are identified. This suits projects with few defect samples or defect shapes that are hard to enumerate.

OCR Character Recognition

Recognizes inkjet codes, production dates, shelf life and batch information, and can be completed at the same station as packaging appearance inspection.

Barcodes and QR Codes

Reads barcodes and QR codes on products and outer cartons for quantity verification, product traceability and data upload.

The inspection capability of an AI model is built on real samples. During project implementation, normal samples, samples of each defect type, and borderline samples between normal texture and suspected defects must be collected to build the training set, validation set and test set separately; Before the model goes live, independent samples must validate escape, false calls and adaptability across batches.

Vision Software Platform

The control layer that handles image processing, parameter management, result output and data statistics

Visual inspection software is not just an interface that displays images; it is one of the control layers of the whole system: it handles image processing and judgement logic, and also takes on recipe and parameter management, external communication of results, retention of defect images, and production data statistics. Food production lines usually involve switching between multiple product specifications, so the software needs to support fast switching of inspection recipes.

Product recipe management

Different products correspond to different inspection parameter sets, so independent recipes can be created and switched quickly for multi-SKU production on one line. Product A calls up A's inspection parameters, product B calls up B's.

Inspection Parameter Management

Centrally manages inspection areas, defect thresholds, dimensional and contour tolerances, color thresholds and AI model parameters, with traceable parameter changes.

OK / NG Result Output

Outputs an overall judgement based on the conclusions of each inspection item and sends the result through the PLC or automation control system, interlocked with the rejection action.

Defect Classification and Image Management

Defect type and defect position are recorded, and NG images or all inspection images are saved as required by the project to support quality analysis and review.

Data Statistics and Reports

Counts production quantity, OK quantity, NG quantity, the quantity of each defect type and the defect rate to produce an exportable inspection report.

Equipment Communication and Operation Monitoring

Communicates with PLC, sensors and production line equipment, monitors system operating status, and raises alarms in abnormal situations such as material jams and consecutive NG.

Real-Time Interface Display

Displays the current speed, output, OK count, NG count, yield and defect types in real time, and saves typical NG images for on-site review.

Permissions and Traceability

Operation permissions can be configured according to site management requirements; inspection results, defect records, and image data can be used for quality traceability and batch analysis.

The software interface can be configured to the customer's site requirements to display inspection views, live images, inspection results, defect statistics, and operating status monitoring; if integration with MES, a quality management system, or a production data platform is required, the interface method can be evaluated at the solution stage, see How the Vision System Integrates with the PLC / Production Line .

Technology Architecture

From product imaging to quality judgement, then to production line execution and data management

The complete system is organized in five layers, each with clear responsibilities and each able to be replaced or extended separately; on top of this, a unified AI algorithm platform and visual inspection software form a complete closed loop from "seeing a defect" to "automatic judgement, automatic rejection, and data traceability".

First Layer | Optical Imaging Layer

Industrial camera + lens + light source + trigger system. Responsible for reliably acquiring product images: appearance, contour, color, surface state and position information.

Second Layer | Vision Algorithm Layer

Traditional vision algorithms + AI defect recognition + dimensional measurement + contour analysis. Product positioning, defect recognition and quality judgement are performed, with a 2D / 3D imaging combination used according to the product's characteristics.

Third Layer | Vision Software Layer

Recipe management + parameter management + result management + image management + data statistics + reports. Unified management of the inspection workflow and inspection data.

Layer 4 | Automation Control Layer

PLC + encoder + photoelectric sensor + rejection mechanism. It completes product position tracking, inspection result output and automatic sorting, achieving closed-loop control between the vision system and the production line.

Fifth Layer | Production Data Layer

Inspection records + defect images + production statistics + data interface. Providing data support for quality analysis, traceability and production management.

Execution Chain

Product in position trigger → image acquisition → algorithm judgement → OK / NG → result sent to PLC → product position tracking → automatic NG rejection / diversion → data recording.

The four-layer structure usually corresponds to this hardware: industrial cameras and lenses, application-specific light sources, photoelectric sensors and encoders, industrial controllers (industrial PCs or vision controllers), PLCs, display terminals and rejection mechanisms. The frame and guarding structure must be designed to meet the hygiene and cleaning requirements of a food production environment.

inspection Method

How to choose between 2D, 2.5D, 3D, line-scan and area-scan

The choice of imaging method depends on three factors: the type of feature that must be detected on the product, the production cycle time (conveying speed), and the range of height variation of the product. The following are the applicable scope and trade-off logic of common methods:

Imaging MethodApplicable Inspection ScopeKey Selection Points
2D area scanAppearance defect, color, contour, missing corner, presence/absence, arrangement, poseThe most general option. Suited to applications where products reliably enter the field of view and surface features dominate
2.5D Photometric StereoSurface dent, bulge, indentation, fine crack, texture differenceReconstructs surface normals with multi-directional light sources; more effective for defects that are similar in color but differ in relief
3D VisionHeight, thickness, flatness, volume-related features and significant height variationAssess when the product has significant height variation or requires height measurement
Line scanContinuous high-speed conveying, large-area products, roll or continuously arranged productsRequires motion synchronization and strobe coordination; suited to lines running at high speed with a continuous product flow
Multi-camera / multi-angleMulti-face coverage of top surface + side edges + bottom surfaceUsed when the product is large or has side edges and multi-face quality requirements, reducing blind spots from a single viewpoint
Both-Side ArchitectureGranular and block-shaped products with appearance requirements on both front and back sidesUpper and lower dual vision in synchronization, or a flipping mechanism with dual stations, adjusted to the conveying structure
Final selection is subject to Sample Trial Results as the basis. The same inspection item may be feasible with different imaging methods, but stability, cycle time margin and cost differ considerably, so each must be verified one by one with on-site samples; see Industrial Camera Selection: Area-Scan or Line-Scan and Light Source and Illumination Selection .

equipment and Complete Machine

Structure and site adaptation of food inspection machine models

The complete machine of food visual inspection equipment usually consists of a conveying section, a visual inspection section, a rejection / diversion section, and an electrical control section. The frame uses a structure that is easy to clean, and the electrical control and vision components are arranged separately from the conveying area for ease of daily cleaning and maintenance; the infeed and outfeed sections can be fitted with side guards and guides for product spacing and pose alignment.

The equipment structure, materials, ingress protection rating and cleaning method must be confirmed together with the customer's on-site hygiene management regulations and washdown requirements; the figure above is a reference for the equipment structure, The final configuration is subject to site conditions and solution confirmation.

Applicable Industry

Which Food Sub-Segments These Solutions Typically Serve

In terms of product form, the common applications of this type of solution include: baked goods (cookies, biscuits, wafers, bread, cake, egg tarts), candy and chocolate (hard candy, soft candy, filled candy, lollipops, chocolate blocks), nuts and roasted snacks (peanuts, sunflower seeds, almonds, cashews, pistachios, mixed nuts), puffed and snack foods (potato chips, shrimp crackers, rice crisps, corn flakes), fruits, vegetables and fresh-cut produce, and granular and block foods (jelly, preserved fruit, soy products, regular block meat products), as well as packaging forms such as bags, boxes, bottles, cans and blister packs.

The above covers the Common Application Areas. Actual feasibility depends on product form, material, surface characteristics and site conditions, and is subject to the conclusion of sample trials.

Typical Case Studies

Reference for food inspection items organized according to the standard case structure

The two cases below are organized with a unified project structure: project scenario -> inspection requirement -> overall workflow -> technical solution -> algorithm and software -> rejection interlocking -> implementation priorities -> acceptance method. The cases illustrate how a solution is organized and how implementation is approached, The inspection items listed are those that may be involved within the scope of this project assessment; they do not mean that any site has confirmed the presence of these defects.

Case 01 | Visual Inspection of Both Sides on a Candy Production Line

Project Scenario: After forming, cooling and settling, the candy enters the visual inspection area on a conveyor belt. The system runs the candy through the complete sequence of "front-side inspection -> back-side inspection -> image matching -> AI defect recognition -> OK / NG -> automatic rejection", and conforming products move on to the downstream packaging process step.

Inspection ObjectsPossible Inspection Scope
Front sideChipped corners, damage, cracks, foreign matter, color anomalies, surface bubbles, shape defects
Back sideBottom sticking, indentation, damage, foreign matter, color difference, incomplete forming
Dimension and FormLength, width, outer contour, roundness, missing area
Production StatusEscapes, re-inspection, candy sticking, abnormal product spacing

Two technical approaches to double-sided inspection:

Option A: Simultaneous Top and Bottom Inspection

Products do not need to be turned over, suitable for continuous high-speed production lines

  • Upper visual inspection checks the front side, and lower visual inspection checks the back side
  • The conveying structure has a transparent inspection window, or the gap between twin belts is used for bottom-side imaging
  • Photoelectric triggering and encoder signals synchronize acquisition by the upper and lower vision units
  • Requires only minor changes to the existing conveyor line, making integration with site structures easier

Option B: Two-Station Inspection After Flipping

Suitable for scenarios where the underside cannot be imaged through gaps

  • The product first enters the first station to complete inspection of one side
  • After the flipping mechanism changes the orientation, the part enters the second station for inspection of the other side
  • The imaging conditions for the front and back sides can be optimized separately
  • Verify whether flipping causes products to stick together, deform or become damaged

Result matching and judgement: After top and bottom vision, or two stations, output their results separately, the software associates them by product ID, trigger sequence, encoder position or time relationship. For example, if product A is "front OK + back OK", it is judged as a final OK; if product B is "front OK + back NG", it is judged as a final NG. If the candy is prone to sticking, deformation or has a coated surface, we recommend first validating a non-contact bottom-surface imaging method, with the final selection subject to on-site sample trial results.

Implementation Focus: ① Minimum defect size confirmation — for example, when a customer requires detection of a 0.5 mm defect, the field of view and resolution must be calculated to determine whether that defect can achieve sufficient pixel coverage; the specific resolution is calculated from the on-site product dimensions, field of view and speed, and verified with a sample trial; ② Optical stability — shield the inspection area from light and use a stable illumination structure to prevent changes in ambient light from affecting color and surface judgement; ③ Product position adaptability — use mechanical guides and spacing to improve the consistency with which products enter the vision area; ④ Front and back sides synchronous design — combine conveying speed, product spacing and trigger signals to ensure that the results on both sides correspond to the same product; ⑤ Defect sample validation — collect samples that are normal, chipped corner, crack, foreign matter, color abnormality, damage, abnormal shape, etc., and establish the final judgement rules based on the actual quality standard.

Case 02|Cookie Production Line Appearance Defect and Baking State Inspection

Project Scenario: For products such as biscuits, cookies, wafers and sandwich biscuits, machine vision performs inline inspection before baking, cooling, arranging and packaging. Unlike candy, the criteria for biscuits also include Color, shape, cracks, missing corners, baking state and surface texture, so the solution focuses on distinguishing "normal baking texture" from "real defects".

Typical solution chain: Conveyor → pitch spacing → upper vision → lower vision (optional) → AI algorithm → sorting. If only top-side inspection is required, High-speed area-scan vision completes the main inspection items; if the bottom surface must also be inspected, top-and-bottom dual vision or flip-over inspection is used.

Inspection TargetOptical Design Approach
Outer Contour, Corner ChippingDesigned around contour contrast and background separation
Surface CrackUse illumination at a suitable angle to enhance texture and edge features
Scorch marks, color anomaliesStable diffuse illumination and color calibration
dimensional inspectionUniform backlight or illumination suited to contour extraction
Surface dents, protrusionsSelect side or combined illumination according to the surface structure
Product presence/absence, arrangementEnsures sufficient contrast between the product and the background

Algorithm Task Allocation: Traditional vision is suited to outer contour, dimension, color, missing corner, and missing part inspection; AI vision is suited to cracks, baking abnormalities, complex surface defects, and irregular damage, forming a chain of "positioning → segmentation → defect extraction → defect classification → OK / NG". Implementation Challenges: Cookies themselves have natural baking texture, embossing, holes or regular patterns, and these normal features may produce image appearances similar to cracks and scorch marks, so during algorithm development samples must be collected of normal products, of different batches, colors and baking states, of each type of real defect, and of boundary cases between normal texture and suspected defects, in order to reduce false calls; in addition, cookies are fragile food, so the rejection mechanism must be evaluated for air-blow pressure, pusher speed and contact method to avoid secondary breakage.

Both cases above are configured according to Project Document Conventions compiled to explain the solution structure and implementation method. The specific inspection items, defect types, and inspection indicators in the cases must all be reconfirmed against the customer's actual samples, production line conditions, and quality standards, and are not general commitments.

Implementation Workflow

The complete path from requirement discussion to on-line acceptance

  • 01 Project requirement discussion: confirm the product type, production line structure, cycle time and inspection purpose
  • 02 Product sample analysis: analyze the shape, material, color, surface characteristics and conveying state
  • 03 Vision feasibility assessment: judge whether the imaging method and algorithm route are feasible, and identify risk items
  • 04 Defect standard review: define defect types, acceptance criteria and how to handle edge cases together with quality control
  • 05 Vision sample trial: run illumination experiments and algorithm validation on real samples, and output measured conclusions
  • 06 Equipment solution design: determine the camera, lens, light source, mechanism, and control method
  • 07 System integration and joint debugging: interfacing with PLCs, rejection mechanisms and data interfaces
  • 08 On-site validation and acceptance: test coverage, stability and rejection accuracy against the confirmed samples

The focus of project implementation is never just choosing a camera; it is solving at the same time Product imaging, defect recognition, motion synchronization and automatic rejection Four stages. Of these, sample trial validation is the step most easily skipped, yet it affects downstream acceptance the most — a visible defect does not mean the defect can be classified reliably; inspection capability must be confirmed through sample testing and on-site validation.

Acceptance indicators should be confirmed jointly after the sample trial and on-site validation, covering inspection coverage, defect inspection, stability, inspection cycle time, escapes and false calls, rejection accuracy, data recording, and software functions; see Machine Vision Inspection Acceptance: How to Write a Standard Nobody Will Argue About.

Why Choose EEK

Turnkey delivery covering optical imaging, vision algorithms, AI defect recognition and automation integration

EEK eeK focuses on machine vision inspection solutions, centering on Optical imaging, vision algorithms, AI defect recognition, visual inspection software and automation equipment integration, providing integrated solutions from vision validation to in-line mass production inspection for industries such as food, automotive parts, stamped parts, and electronic hardware.

For the food industry, EEK combines 2D vision, 2.5D vision, 3D vision, and AI vision algorithms to perform inline inspection of food appearance defects, color, dimension, shape, presence/absence, packaging, and the production process, and connects PLCs, rejection mechanisms, and production data systems through vision software to achieve a complete inspection closed loop from "seeing a defect" to "automatic judgement, automatic rejection, and data traceability".

Algorithms and Software Are the Core Capability

The solution capability goes beyond supplying cameras, lenses and light sources: optical imaging design, conventional vision algorithms, AI defect recognition and visual inspection software are delivered as one integrated whole.

Optical Design Is Defined by the Sample

Imaging methods are designed separately for the material, color, form, surface texture and production cycle time of different foods, rather than applying a fixed camera plus light source combination.

Covers Both Inspection and Execution

Extending from visual inspection to PLC interlocking, rejection mechanisms, diverting devices and data interfaces, what is delivered is an operable inspection section, not an isolated imaging unit.

Conclusion Is Subject to Sample Trial

In the early stage of the project, imaging and algorithm feasibility is validated with real samples; no numerical commitment is made for metrics without a basis, and the acceptance criteria are confirmed jointly after validation.

This Category Solution

Food industry sub-solutions and related subpages

The food industry can be further broken down into separate solution pages by category and inspection stage. The table below lists the related pages that are already built and accessible; the remaining sub-directions are planned according to the ten product directions above and will go live as their content is completed.

Solution to Be AddedCandy Visual Inspection · Appearance / Color / Shape / Both Sides
Solution to Be AddedBiscuit Visual Inspection · Crack / Chipped Corner / Color / Dimension
Solution to Be AddedChocolate visual inspection · defect / surface / pattern
Solution to Be AddedBread and Pastry Visual Inspection · Shape / Baking / Decoration
Solution to Be AddedNut Visual Inspection · Color / Damage / Foreign Matter / Dimension
Solution to Be AddedChips and Puffed Food Inspection · Damage / Scorch Marks / Color
Solution to Be AddedFruit, vegetable and fresh-cut food inspection · appearance / color / rot
Solution to Be AddedGranular and Block Food Inspection · Presence/Absence / Color / Foreign Matter
Solution to Be AddedFood Packaging Inspection · Seal / Label / Inkjet Code / Fill Volume
Sub-solution slots in this category have been reserved for ten product directions and will go live as material is completed. If your product is not in the range above, you can submit samples for a separate evaluation.

This Category Document Checklist

Confirmed items and outstanding items

Information ItemDescriptionStatus
Product category and formDetermines the piece-separation method, imaging solution and rejection mechanismTo be added
Required defect types and critical sizeDetermines the field of view, resolution and algorithm routeTo be added
Whether full inspection of front and back sides is requiredDetermines whether to use top and bottom dual vision or a two-station flip designTo be added
Color standard and color difference toleranceDetermines the light source plan and the color calibration methodTo be added
Is inspection performed with packaging?With packaging, the packaging material's light transmission must be evaluatedTo be added
Site hygiene and protection requirementsDetermines equipment material, structure, and ingress protection ratingTo be added
Line cycle time and conveying typeDetermines the number of cameras, the trigger method and the motion synchronization schemeTo be added
Rejection method and action requirementsAir blow / lever / pusher / diverter / line stop / sample retentionTo be added
PLC brand and communication methodDetermines the interface type for result output and interlockingTo be added
Acceptance criteria and acceptance planDefined quantitatively together with the quality control departmentTo be added
"To be added" items are content that can only be finalized with real business information. Until that information is complete, this page will not be filled with speculative detection rates, accuracy, or throughput figures — specifications, indicators, and conclusions are subject to measurement and real data.

Common Question

Common questions about visual inspection in the food industry

How does visual inspection in the food industry differ from general industrial visual inspection?

The main differences lie in three places, and the algorithm is not the biggest difficulty. The first is site conditions: food workshops involve washdown, moisture, dust and hygiene management, so equipment structure, materials, gaps and ingress protection rating must all be designed to site regulations. Second is Inspected Object Form: food has irregular shapes, natural variation and frequent stacking and occlusion, and its surface may be wet and reflective, so singulation and multi-face imaging are usually required. Third is Judgement and Traceability: acceptance criteria are often tied to hygiene and safety, so retained samples, records and NG handling must align with on-site procedures.

Can it replace a metal detector or X-ray machine?

They cannot replace each other. Visual inspection covers the product Surface and Appearance, the metal detector is designed for Metal Foreign Matter, which X-ray inspection can check Internal foreign matter and missing parts. In practice, production lines usually use them in combination, each covering different risk points, and they must be configured separately according to foreign matter type and risk level.

What Is the Smallest Defect or Foreign Object That Can Be Detected?

It depends on Contrast and Imaging Conditions, it cannot be estimated from size alone. Dark foreign matter on a light-colored product can often be detected at a smaller size, while same-color foreign matter may be hard to resolve consistently even when larger. The customer must first confirm the minimum defect size to be detected, and the field of view and resolution are then calculated from it, with sample trial validation using real samples.

Can wet, oily or highly reflective products be inspected?

Yes, but the optics must be designed to handle reflections. Wet or oily surfaces easily produce specular reflection, which overexposes parts of the image so that defects are drowned out; usually Polarized or wide-angle diffuse illumination pressing. At the same time, whether water droplets and oil droplets themselves would trigger false calls by being judged as defects must be assessed, which requires measured testing of products in their real state.

What Can Be Done When Transparent or Translucent Food Is Hard to Image?

For transparent and semi-transparent products (such as jelly, gummy candy and some candied fruit), conventional grayscale imaging lets light pass through, so contour and internal structure mix together. Such cases require, according to the material characteristics Redesign the light source and background, for example backlit contour, dark field or specific wavelength illumination, with the solution determined through sample illumination trials.

How can both sides be fully inspected in one pass?

two routes. Approach one is synchronized top and bottom vision: The upper camera captures the front side, while the lower one captures the back side through a transparent viewing window in the belt or through the conveying gap; photoelectric triggering and an encoder ensure that the two camera groups correspond to the same product, so the product does not need to be flipped. Option two is two-station inspection after flipping: First inspect one side, then use a flipping mechanism to change the pose and enter the second station. Which route to choose depends on the conveying structure, the stability of the product pose, and whether the product may be flipped.

How are the front and back inspection results guaranteed to match the same part?

relies on Product ID, trigger sequence, encoder position or timing relationship Correlate the results. The software creates an independent inspection object for each product, merges the conclusions of each station and each inspection item, and outputs a combined judgement: for example, front OK plus back OK is judged final OK, and NG on either side is judged final NG.

Can the equipment be installed directly on an existing production line?

Most projects can, but three things need to be confirmed: Installation location and space Whether the optical working distance is met, Conveying Method whether it is suitable for imaging (vibration noticeably affects image quality), as well as with the existing PLC and Rejection Mechanism interface. When the conditions cannot be met, the mechanism usually needs to be adjusted together with the solution design rather than changing only the vision section.

How are inspection standards defined?

It is recommended that Quality control or quality department Quantitative definitions: which appearances count as defects, the maximum allowable defect size, how borderline cases are handled, and how normal texture and baking color difference are distinguished from defects. The equipment supplier can provide data and methodological suggestions, but the standard should be confirmed by the customer, otherwise disputes easily arise at the acceptance stage.

Will the Acceptance Criteria Lock In a Detection Rate?

No. Metrics such as inspection coverage, escape rate, false call rate and inspection cycle time must be Real samples, clear quality standards and on-site production conditions jointly confirmed below. In the early stage of a project we do not make numerical commitments that lack evidence; we first complete sample trials and on-site validation and then write these specifications into an acceptance plan confirmed by both sides.

Can Visual Inspection Replace Metrology-Grade Dimensional Inspection?

Direct replacement is not recommended. Visual dimensional inspection is suitable for production line Inline Screening and judgements of contour, shape, and missing corners; for metrology-grade measurement with strict tolerance requirements, camera resolution, lens distortion, mechanical stability, and the calibration solution must be evaluated separately, with actual validation results as the basis.

How are NG products rejected? Will that cause secondary damage?

The rejection method is selected according to product shape, weight, fragility and available space on site; common options are Air blow, reject arm, pusher, diverter etc. For fragile food, the impact force and the contact method must be assessed carefully, and the air-blow pressure must be controlled or a flexible mechanism used instead, and a continuous running test must be carried out during validation to confirm that no secondary damage occurs.

How many defect samples does an AI algorithm need?

There is no fixed numerical threshold; it depends on the complexity of the defect types and the differences in their forms. During project implementation it is necessary to collect Normal samples, samples of each type of real defect, and borderline samples between normal texture and suspected defects, and separate training, validation and test sets are established. Before the model goes live, independent samples must be used to verify escapes, false detections and adaptability across batches.

Do all defects require AI?

Not necessarily. Inspection items with clear rules, such as outer contour, dimensions, color range, chipped corners, presence/absence and count, can be handled with Traditional vision algorithm are easier to parameterize and validate, whereas items with complex morphology and large sample variation, such as cracks, differences in baking state, complex surface defects and irregular damage, are better suited to AI. In practice, projects usually combine the two.

Submit sample testing

Send us the product, defect samples, inspection requirements and production line cycle time; a solution engineer will determine which category of inspection problem it belongs to and give recommendations on the imaging method, algorithm route and configuration.

JPG / PNG supported, multiple files allowed
Each file must not exceed 20 MB
    JPG / PNG supported, multiple files allowed
    Each file must not exceed 20 MB
      JPG / PNG supported, multiple files allowed
      Each file must not exceed 20 MB
        A solution engineer will contact you within 1 business day after submission

        Need to assess imaging conditions, defect criteria and cycle time item by item? Go to the Full Requirement Assessment →

        Not Sure Which Category?

        Send us the workpiece, defect samples and inspection requirements, and a solution engineer will determine which category of inspection problem it is and give recommendations on the imaging method, algorithm route and equipment configuration.

        Online support WhatsApp
        WeChat
        Scan the QR code to add us on WeChat
        Call us Back to top