A method (100, 300) of processing an ophthalmic image, the method comprising: detecting (110, 310) image data of an ophthalmic region involving an ophthalmic layer by an imaging system; constructing (120, 320) an image graph, comprising nodes connected by links and the detected image data corresponding to at least one of the nodes and links, by an image processor from the image; and performing (130, 330) a heuristic graph-search for a path on the image graph that corresponds to an image of the ophthalmic layer by assigning (140, 340) at least one of link-costs to links of the image graph and node-costs to nodes of the image graph; assigning (150, 350) heuristic-costs to at least one of the nodes and the links of the image graph; wherein the assigning the heuristic-costs comprises: determining a distance of the at least one of a node and a link from an edge of the image by the image processor; and defining the heuristic cost of at least one of the node and the link as a function of the determined distance (a) creating (160, 360) extended paths by extending a selected path from its front node with extension links; (b) determining (170, 370) path-costs of the extended paths by combining heuristic costs of the extended paths with chain costs of the extended paths, wherein the heuristic costs of a path is the heuristic cost of its front node, and the chain cost of a path is one of a sum of the link-costs of the links of the path, a sum of the node-costs of the nodes of the path, and a weighted sum of the link-costs and node-costs of the links and nodes of the path; (c) selecting (180, 380) a lowest cost path, chosen from the extended paths and from stored non-selected paths, as an updated selected path; and (d) storing (190, 390) non-selected extended paths and their costs, and marking the front node of the selected path as examined; wherein the steps (a)-(d) are repeated iteratively. detecting (110, 310) image data of an ophthalmic region involving an ophthalmic layer by an imaging system; constructing (120, 320) an image graph, comprising nodes connected by links and the detected image data corresponding to at least one of the nodes and links, by an image processor from the image; and performing (130, 330) a heuristic graph-search for a path on the image graph that corresponds to an image of the ophthalmic layer by assigning (140, 340) at least one of link-costs to links of the image graph and node-costs to nodes of the image graph; assigning (150, 350) heuristic-costs to at least one of the nodes and the links of the image graph; wherein the assigning the heuristic-costs comprises: determining a distance of the at least one of a node and a link from an edge of the image by the image processor; and defining the heuristic cost of at least one of the node and the link as a function of the determined distance (a) creating (160, 360) extended paths by extending a selected path from its front node with extension links; (b) determining (170, 370) path-costs of the extended paths by combining heuristic costs of the extended paths with chain costs of the extended paths, wherein the heuristic costs of a path is the heuristic cost of its front node, and the chain cost of a path is one of a sum of the link-costs of the links of the path, a sum of the node-costs of the nodes of the path, and a weighted sum of the link-costs and node-costs of the links and nodes of the path; (c) selecting (180, 380) a lowest cost path, chosen from the extended paths and from stored non-selected paths, as an updated selected path; and (d) storing (190, 390) non-selected extended paths and their costs, and marking the front node of the selected path as examined; wherein the steps (a)-(d) are repeated iteratively. determining a distance of the at least one of a node and a link from an edge of the image by the image processor; and defining the heuristic cost of at least one of the node and the link as a function of the determined distance (a) creating (160, 360) extended paths by extending a selected path from its front node with extension links; (b) determining (170, 370) path-costs of the extended paths by combining heuristic costs of the extended paths with chain costs of the extended paths, wherein the heuristic costs of a path is the heuristic cost of its front node, and the chain cost of a path is one of a sum of the link-costs of the links of the path, a sum of the node-costs of the nodes of the path, and a weighted sum of the link-costs and node-costs of the links and nodes of the path; (c) selecting (180, 380) a lowest cost path, chosen from the extended paths and from stored non-selected paths, as an updated selected path; and (d) storing (190, 390) non-selected extended paths and their costs, and marking the front node of the selected path as examined; wherein (a) creating (160, 360) extended paths by extending a selected path from its front node with extension links; (b) determining (170, 370) path-costs of the extended paths by combining heuristic costs of the extended paths with chain costs of the extended paths, wherein the heuristic costs of a path is the heuristic cost of its front node, and the chain cost of a path is one of a sum of the link-costs of the links of the path, a sum of the node-costs of the nodes of the path, and a weighted sum of the link-costs and node-costs of the links and nodes of the path; (c) selecting (180, 380) a lowest cost path, chosen from the extended paths and from stored non-selected paths, as an updated selected path; and (d) storing (190, 390) non-selected extended paths and their costs, and marking the front node of the selected path as examined; wherein the steps (a)-(d) are repeated iteratively.