NGC 4815 is a distant and populous open cluster, which lies in the gal
actic plane in a region of strong absorption. As a consequence, its me
mbership, spatial distribution and luminosity function are not well de
termined. In this paper, we present an algorithm which uses both posit
ional and photometric data simultaneously to search for open cluster m
embers. The contribution of the field stars is estimated by our Galaxy
model software. The method has been developed for deep CCD photometri
c observations, but it can also be used to investigate the membership
in an n-dimensional space, including proper motions, radial velocity a
nd metallicity. A clean and well defined colour-magnitude diagram (CMD
) for NGC 4815 has been obtained after decontaminating from field star
s. We have investigated the spatial distribution of cluster members an
d the luminosity function. We have shown that the projected surface di
stribution of stars is well-represented by an exponentially decreasing
function with a scale length of 1.67 +/- 0.06 arcmin. We have found e
vidence for mass segregation. The luminosity function for NGC 4815 is
similar to that of the Hyades cluster, and shows a gap at V = 15 mag.