
Surface Quality Detection Techniques
Background
The goal of this project is to propose an approach for edge and surface quality detection in the postproduction phase using readily available and familiar devices
My role involved performing image acquisition and processing before inputting the images into a vision transformer.

Technical Details
-
The CNC-machined brass parts were classified into three main categories depending on their machined cutting speed (low, medium, and coarse) and the cutting tool size (1/2in, 1/4in, 3/8in). To collect a large amount of data for brass surfaces, a microscope was set up to capture images under different lighting conditions (ambient lighting, ring lighting, and angled lighting). Each brass part was divided into many passes corresponding to a cutting speed and multiple images were captured for every pass. The figure below illustrates an example among 27 combinations that I performed for this project.
-
After gathering the images of all the combinations, the data was fed into a Python code that conducted patch extraction. This code generated multiple patches from each image, all with standardized dimensions, and then stored them in their corresponding folders. Following that, the images within the folders were labeled based on their respective surface roughness using a vision transformer.

An example of a brass part with four machining passes, from which multiple images are taken.

Below are some examples of brass surfaces under the microscope, showing variations in texture and finish for different tool sizes and cutting speeds.



Outcomes/lesson learned
-
​Angled lighting emerged as the optimal condition due to the clear and uniform color of the captured images
-
Ambient light images underwent additional image processing to enhance their brightness
​
​
-
​Understanding the principles of CNC machining and how cutting speeds and tool sizes affect the quality of machined parts​
-
Paid close attention to details and thought systematically to organize each image in its corresponding folder with the correct naming convention.
-
Performed patch extraction using Python and saved the images in post-processing folders.
​
​