An optical fingerprint apparatus, wherein the optical fingerprint apparatus is configured to be disposed under a display screen of an electronic device and comprises: a light directing layer configured to direct a light signal returned from a finger above the display screen to an optical sensing array along at least two directions, wherein the at least two directions are oblique with respect to the display screen, and projections of the at least two directions on the display screen are at different angles with a polarization direction of the display screen; and the optical sensing array comprising a plurality of sensing unit groups, each sensing unit group comprising at least two optical sensing units, and each optical sensing unit of the at least two optical sensing units being configured to receive a light signal in one direction of the at least two directions, wherein light signals in the at least two directions are used to obtain a fingerprint image of the finger, and a difference between the light signals in the at least two directions received by the sensing unit group is used to determine whether the finger is a real 3D finger or a fake 2D finger; wherein a difference in at least one of a signal amount, a modulation transfer function, MTF, spatial noise, or a contrast of the light signals in the at least two directions is used to determine whether the finger is a real 3D finger or a fake 2D finger; wherein the at least two directions comprise a first direction and a second direction, a projection of the first direction on the display screen is parallel to the polarization direction of the display screen, and a projection of the second direction on the display screen is perpendicular to the polarization direction of the display screen; and if a difference value between a signal amount of a light signal in the first direction and a signal amount of a light signal in the second direction falls within a first range, it is determined that the finger is a real 3D finger; or if a difference value between a signal amount of a light signal in the first direction and a signal amount of a light signal in the second direction does not fall within a first range, it is determined that the finger is a fake 2D finger. a light directing layer configured to direct a light signal returned from a finger above the display screen to an optical sensing array along at least two directions, wherein the at least two directions are oblique with respect to the display screen, and projections of the at least two directions on the display screen are at different angles with a polarization direction of the display screen; and the optical sensing array comprising a plurality of sensing unit groups, each sensing unit group comprising at least two optical sensing units, and each optical sensing unit of the at least two optical sensing units being configured to receive a light signal in one direction of the at least two directions, wherein light signals in the at least two directions are used to obtain a fingerprint image of the finger, and a difference between the light signals in the at least two directions received by the sensing unit group is used to determine whether the finger is a real 3D finger or a fake 2D finger; wherein a difference in at least one of a signal amount, a modulation transfer function, MTF, spatial noise, or a contrast of the light signals in the at least two directions is used to determine whether the finger is a real 3D finger or a fake 2D finger; wherein the at least two directions comprise a first direction and a second direction, a projection of the first direction on the display screen is parallel to the polarization direction of the display screen, and a projection of the second direction on the display screen is perpendicular to the polarization direction of the display screen; and if a difference value between a signal amount of a light signal in the first direction and a signal amount of a light signal in the second direction falls within a first range, it is determined that the finger is a real 3D finger; or if a difference value between a signal amount of a light signal in the first direction and a signal amount of a light signal in the second direction does not fall within a first range, it is determined that the finger is a fake 2D finger.