With the proliferation of different types of IC packages, there is a need f
or machine-vision-based inspection systems to be able to efficiently identi
fy the orientation of IC packages to ensure that they are shipped to end-us
ers in the proper orientation. The orientation of IC packages can be determ
ined by locating special features called notches or dimples, which are mold
ed on the IC packages. This paper presents an algorithm that automatically
checks the orientation of different types of IC packages. Our algorithm inc
orporates several procedures to achieve a fast and robust operation. Firstl
y, the boundary of the IC package is detected and aligned; then regions whe
re the notch or dimple may exist are isolated. Adaptive double thresholding
is applied in the selected regions to extract the possible notches or dimp
les. The extracted objects are then analyzed to determine whether they repr
esent the notch or the dimple. In these procedures, intensity-based informa
tion as well as the gradient-based information is analyzed to generate a mo
re comprehensive description of the features of interest.