A method for manufacturing an optoelectronic device including an array of light-emitting diodes , including the following steps: - forming the array of light-emitting diodes on a support face of a substrate , this step being carried out so that each light-emitting diode has an elongated wire shape along a longitudinal axis extending along a transverse direction (Z) of the optoelectronic device oriented transversely to the support face of the substrate , - forming spacer walls made of a first dielectric material transparent to the light radiation coming from the light-emitting diodes , the formed spacer walls being such that the lateral sidewalls of each light-emitting diode , over its entire height (H) considered in the transverse direction (Z), are surrounded by at least one of the spacer walls , - forming light confinement walls formed of a second material adapted to block the light radiation coming from the light-emitting diodes , the formed light confinement walls directly covering the lateral sidewalls of the spacer walls while being in contact with these, so that the light radiation coming from each light-emitting diode and directed in the direction of the adjacent light-emitting diodes is blocked by the light confinement wall that covers the spacer wall that surrounds said light-emitting diode , wherein the step of forming the spacer walls is implemented so that the formed spacer walls have an outer face with a convex shape and so that at least one of said spacer walls has, over a lower portion (PI) of its height considered along the transverse direction (Z) located on the side of the support face of the substrate , a thickness considered transversely to the longitudinal axis of the light-emitting diode surrounded thereby which increases when getting away from the support face of the substrate along the transverse direction (Z) and which has, over an upper portion (PS) of its height located on the side opposite to the support face of the substrate with respect to said lower portion (PI), a thickness considered transversely to the longitudinal axis of the light-emitting diode surrounded thereby which decreases at the level of the upper edge of the light-emitting diode when getting away from the support face of the substrate along the transverse direction (Z) and in that the formed light confinement walls have an inner face having a concave shape complementary to said convex shape and facing the light-emitting diode that they confine the light radiation thereof. - forming the array of light-emitting diodes on a support face of a substrate , this step being carried out so that each light-emitting diode has an elongated wire shape along a longitudinal axis extending along a transverse direction (Z) of the optoelectronic device oriented transversely to the support face of the substrate , - forming spacer walls made of a first dielectric material transparent to the light radiation coming from the light-emitting diodes , the formed spacer walls being such that the lateral sidewalls of each light-emitting diode , over its entire height (H) considered in the transverse direction (Z), are surrounded by at least one of the spacer walls , - forming light confinement walls formed of a second material adapted to block the light radiation coming from the light-emitting diodes , the formed light confinement walls directly covering the lateral sidewalls of the spacer walls while being in contact with these, so that the light radiation coming from each light-emitting diode and directed in the direction of the adjacent light-emitting diodes is blocked by the light confinement wall that covers the spacer wall that surrounds said light-emitting diode , <EOS>