A method for detecting an arbitrary number of touches from an input image delivered by a multi-touch device based on capacitive sensors, said method comprising the following steps: - processing (1010-1050) said input image and obtaining a processed image ; - segmentation by thresholding of said processed image and obtaining a segmented image; - identifying regions of the segmented image; characterised in that said method also comprises the steps of - finding local maxima, each local maximum being of size one pixel and belonging to one sub-region inside each region, wherein said sub-region is of size N × N pixels, wherein N is an odd integer number; wherein said finding comprises a plurality of iterations where at each iteration: - a said sub-region is defined, said sub-region being centred on one pixel of a region, said pixel being changed at each iteration; - verifying whether the pixels inside said sub-region, other than the pixel in the center of said sub-region, have a value lower than the value of said pixel in the center of said sub-region; - if the previous step is verified, identifying said pixel in the center of said sub-region as a local maximum of size one pixel, - discarding some regions according to predetermined conditions based on the area, the square shapedness factor of said regions and/or the number of the local maxima of size one pixel found in each region, - determining at least one touch position based on said local maxima by computing of the geometric center of each region that remains after said discarding, wherein said computing takes into account all the pixels of a region if said region contains one local maximum of size one pixel, and wherein said computing takes into account only the pixels inside the sub-regions centred in each local maximum of a region if said region contains more than one local maximum of size one pixel. - processing (1010-1050) said input image and obtaining a processed image ; - segmentation by thresholding of said processed image and obtaining a segmented image; - identifying regions of the segmented image; - finding local maxima, each local maximum being of size one pixel and belonging to one sub-region inside each region, wherein said sub-region is of size N × N pixels, wherein N is an odd integer number; wherein said finding comprises a plurality of iterations where at each iteration: - a said sub-region is defined, said sub-region being centred on one pixel of a region, said pixel being changed at each iteration; - verifying whether the pixels inside said sub-region, other than the pixel in the center of said sub-region, have a value lower than the value of said pixel in the center of said sub-region; - if the previous step is verified, identifying said pixel in the center of said sub-region as a local maximum of size one pixel, - a said sub-region is defined, said sub-region being centred on one pixel of a region, said pixel being changed at each iteration; - verifying whether the pixels inside said sub-region, other than the pixel in the center of said sub-region, have a value lower than the value of said pixel in the center of said sub-region; - if the previous step is verified, identifying said pixel in the center of said sub-region as a local maximum of size one pixel, - discarding some regions according to predetermined conditions based on the area, the square shapedness factor of said regions and/or the number of the local maxima of size one pixel found in each region, - determining at least one touch position based on said local maxima by computing of the geometric center of each region that remains after said discarding, wherein said computing takes into account all the pixels of a region if said region contains one local maximum of size one pixel, and wherein said computing takes into account only the pixels inside the sub-regions centred in each local maximum of a region if said region contains more than one local maximum of size one pixel. <EOS>