A retrieval controller for identifying an item to be retrieved from a flat storage surface by a robot, the retrieval controller comprising: a depth map computing unit arranged to establish a global coordinate system, establish an orthonormal set of basis vectors u, v and w defined in the global coordinate system, where w is approximately orthogonal to the surface that the items are stored on, receiving a depth map from a depth sensor, converting the received depth map into a 3D Point Cloud defined in the global coordinate system, computing a representation of a partitioning into segments of the 3D Points of the 3D Point Cloud such that a segment contains a pair of 3D Points only if the 3D points should be considered to be part of the surface of the same item; a prism calculating unit arranged to compute a right, enclosing prism for each segment; a vector determination unit arranged to compute each of: a. outwards-pointing normal of each w-aligned face of each computed right, enclosing prism, b. outwards-pointing normal of each w-aligned edge of each computed right, enclosing prism, c. which w-aligned edges of each computed right, enclosing prism correspond to grasp points that should be precluded from an item selection process; an item selection unit arranged to iterate over the w-aligned edges of each right, enclosing prism, that do not correspond to grasp points that should be precluded from the item selection process, computing a pair of quadrilateral-based, right prisms for each such a w-aligned edge, checking whether or not the interior of either of the two quadrilateral-based, right prisms associated with a w-aligned edge intersects any of the right, enclosing prisms; a robot instructing unit arranged to instruct the robot to retrieve the item based on uv coordinates of one or more w-aligned edges whose associated quadrilateral-based, right prisms do not have interiors that intersect any of the right, enclosing prisms as selected by the item selection unit. a depth map computing unit arranged to establish a global coordinate system, establish an orthonormal set of basis vectors u, v and w defined in the global coordinate system, where w is approximately orthogonal to the surface that the items are stored on, receiving a depth map from a depth sensor, converting the received depth map into a 3D Point Cloud defined in the global coordinate system, computing a representation of a partitioning into segments of the 3D Points of the 3D Point Cloud such that a segment contains a pair of 3D Points only if the 3D points should be considered to be part of the surface of the same item; a prism calculating unit arranged to compute a right, enclosing prism for each segment; a vector determination unit arranged to compute each of: a. outwards-pointing normal of each w-aligned face of each computed right, enclosing prism, b. outwards-pointing normal of each w-aligned edge of each computed right, enclosing prism, c. which w-aligned edges of each computed right, enclosing prism correspond to grasp points that should be precluded from an item selection process; a. outwards-pointing normal of each w-aligned face of each computed right, enclosing prism, b. outwards-pointing normal of each w-aligned edge of each computed right, enclosing prism, c. which w-aligned edges of each computed right, enclosing prism correspond to grasp points that should be precluded from an item selection process; an item selection unit arranged to iterate over the w-aligned edges of each right, enclosing prism, that do not correspond to grasp points that should be precluded from the item selection process, computing a pair of quadrilateral-based, right prisms for each such a w-aligned edge, checking whether or not the interior of either of the two quadrilateral-based, right prisms associated with a w-aligned edge intersects any of the right, enclosing prisms; a robot instructing unit arranged to instruct the robot to retrieve the item based on uv coordinates of one or more w-aligned edges whose associated quadrilateral-based, right prisms do not have interiors that intersect any of the right, enclosing prisms as selected by the item selection unit.