A method of detecting objects in an image comprising: receiving an image of a plurality of objects; detecting objects in the received image; generating a region of interest for each detected object in the received image; characterized in generating a plurality of unique raster numbers for each region of interest using a raster number equation by varying parameters of the raster number equation based on pixel coordinates of each region of interest; determining a plurality of sequence positions for each region of interest using the plurality of unique raster numbers; and determining a final sequence position for each region of interest using the plurality of sequence positions for each region of interest, wherein the raster number equation includes a normalization factor, wherein the normalization factor is an average height of the regions of interest, wherein the parameters of the raster number equation are selected from the group consisting of: a row and column number of a pixel corresponding to a center of the region of interest; a row and column number of a pixel corresponding to a left-top of the region of interest; a row and column number of a pixel corresponding to a right-top of the region of interest; a row and column number of a pixel corresponding to a left-bottom of the region of interest; and a row and column number of a pixel corresponding to a right-bottom of the region of interest, wherein the raster number equation is RN = floor r − 1 N ∗ nC + c where, r and c denote the row and column number of a pixel in the region of interest, nC denotes the total number of pixel columns in the image and N denotes the normalization factor. detecting objects in the received image; generating a region of interest for each detected object in the received image; characterized in generating a plurality of unique raster numbers for each region of interest using a raster number equation by varying parameters of the raster number equation based on pixel coordinates of each region of interest; determining a plurality of sequence positions for each region of interest using the plurality of unique raster numbers; and determining a final sequence position for each region of interest using the plurality of sequence positions for each region of interest, wherein the raster number equation includes a normalization factor, wherein the normalization factor is an average height of the regions of interest, wherein the parameters of the raster number equation are selected from the group consisting of: a row and column number of a pixel corresponding to a center of the region of interest; a row and column number of a pixel corresponding to a left-top of the region of interest; a row and column number of a pixel corresponding to a right-top of the region of interest; a row and column number of a pixel corresponding to a left-bottom of the region of interest; and a row and column number of a pixel corresponding to a right-bottom of the region of interest, wherein the raster number equation is RN = floor r − 1 N ∗ nC + c where, r and c denote the row and column number of a pixel in the region of interest, nC denotes the total number of pixel columns in the image and N denotes the normalization factor.