Scénario de test & Cas d'usage
Simulation of image data loading. We create two tables: 'PRODUCTION_LINE' (Source) and 'GOLDEN_MASTER' (Reference) containing binary image placeholders and file paths.
| 1 | DATA casuser.production_line; |
| 2 | LENGTH _path_ $255 _image_ $1024; |
| 3 | INPUT _path_ $; |
| 4 | _image_ = '010101'b; /* Simulated binary image blob */ |
| 5 | DATALINES; |
| 6 | board_a1.jpg |
| 7 | board_a2.jpg |
| 8 | board_a3.jpg |
| 9 | ; |
| 10 | RUN; |
| 11 | |
| 12 | DATA casuser.golden_master; |
| 13 | LENGTH _path_ $255 _image_ $1024; |
| 14 | INPUT _path_ $; |
| 15 | _image_ = '010101'b; /* Simulated binary image blob */ |
| 16 | DATALINES; |
| 17 | board_a1.jpg |
| 18 | board_a2.jpg |
| 19 | board_a3.jpg |
| 20 | ; |
| 21 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.tableInfo / caslib='casuser' name='production_line'; |
| 3 | TABLE.tableInfo / caslib='casuser' name='golden_master'; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | image.compareImages / |
| 3 | sourceImages={TABLE={name='production_line', caslib='casuser'}} |
| 4 | referenceImages={TABLE={name='golden_master', caslib='casuser'}} |
| 5 | casOut={name='defect_report', caslib='casuser', replace=true} |
| 6 | method='SSIM' |
| 7 | pairOnPath=true; |
| 8 | RUN; |
A 'defect_report' table is generated containing SSIM scores for each circuit board. High scores (near 1.0) indicate a pass, while lower scores trigger a manual review.