  We present a new automatic technique based on Principal Component Analysis
and Cluster Analysis, with the aim of its application to the identification of
those clumps in unresolved galaxies which likely represent regions of star
formation. We test the method by applying it to the galaxy M~31, for which
there are already several sets of identifications of OB associations based on
multi--colour images of resolved stars. We use small--scale digital images of
M~31 and compare the associations that we detect from these unresolved data
with previously--published large--scale data, finding a rather good agreement.
We obtain a strict agreement of our identification with the most compact
associations of the original van den Bergh (1964) identification. We then apply
the technique to CCD images of the more distant spiral galaxy NGC~2903 and
identify 68 OB association candidates.
