1. A method of counting glomeruli in an image of a kidney, the method being implemented via execution of computer instructions configured to run at one or more processors and configured to be stored at one or more non-transitory computer-readable media, the method comprising: extracting a second patch centered around each pixel of training images; identifying the second patches that are centered at positive pixels and the second patches that are centered at negative pixels using expert-marked ground truth images; constructing l 1 graphs to model inter-class and intra-class relationships; performing local discriminant embedding; analyzing patches corresponding to each pixel within the image; determining, using the patches, whether each pixel within the image belongs to at least one of the glomeruli; and counting the glomeruli in the image.