A method for capturing an image, comprising: sending (1202; 1302; 2202; 2302), by an application (1502; 2502), an image capturing instruction to a camera driver (1510; 2510), the image capturing instruction carrying a type identifier and a mode identifier, and the type identifier being configured to represent a type of a target image to be captured by the application (1502; 2502); turning on (1204; 1304; 2204; 2304), by the camera driver (1510; 2510), a camera (1504; 2504) based on the image capturing instruction; generating, by the camera driver (1510; 2510), a control instruction based on the type identifier, and sending, by the camera driver (15010; 2510), the control instruction to a first processing unit (1506; 2506), comprising: in response to detecting that the mode identifier is a non-security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier; and sending, by the camera driver (1510; 2510), the control instruction to the first processing unit by a serial peripheral interface, wherein the camera driver (1510; 2510) connects to the first processing unit through the serial peripheral interface; and in response to detecting that the mode identifier is a security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier, and sending the control instruction to a trusted application (1512; 2512) in a security execution environment; and sending, by the trusted application (1512; 2512), the control instruction to the first processing unit (1506; 2506) by a secure serial peripheral interface, wherein the trusted application is in a core of a second processing unit, and the second processing unit connects to the first processing unit (1506; 2506) through the secure serial peripheral interface; turning on (1208; 2208), by the first processing unit (1506; 2506), a light emitter (1508; 2508) based on the type identifier carried in the control instruction; and capturing (1210; 2210), by the camera (1504; 2504), the target image of an object illuminated by the light emitter (1508; 2508). sending (1202; 1302; 2202; 2302), by an application (1502; 2502), an image capturing instruction to a camera driver (1510; 2510), the image capturing instruction carrying a type identifier and a mode identifier, and the type identifier being configured to represent a type of a target image to be captured by the application (1502; 2502); turning on (1204; 1304; 2204; 2304), by the camera driver (1510; 2510), a camera (1504; 2504) based on the image capturing instruction; generating, by the camera driver (1510; 2510), a control instruction based on the type identifier, and sending, by the camera driver (15010; 2510), the control instruction to a first processing unit (1506; 2506), comprising: in response to detecting that the mode identifier is a non-security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier; and sending, by the camera driver (1510; 2510), the control instruction to the first processing unit by a serial peripheral interface, wherein the camera driver (1510; 2510) connects to the first processing unit through the serial peripheral interface; and in response to detecting that the mode identifier is a security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier, and sending the control instruction to a trusted application (1512; 2512) in a security execution environment; and sending, by the trusted application (1512; 2512), the control instruction to the first processing unit (1506; 2506) by a secure serial peripheral interface, wherein the trusted application is in a core of a second processing unit, and the second processing unit connects to the first processing unit (1506; 2506) through the secure serial peripheral interface; in response to detecting that the mode identifier is a non-security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier; and sending, by the camera driver (1510; 2510), the control instruction to the first processing unit by a serial peripheral interface, wherein the camera driver (1510; 2510) connects to the first processing unit through the serial peripheral interface; and in response to detecting that the mode identifier is a security mode, generating, by the camera driver (1510; 2510), the control instruction based on the type identifier, and sending the control instruction to a trusted application (1512; 2512) in a security execution environment; and sending, by the trusted application (1512; 2512), the control instruction to the first processing unit (1506; 2506) by a secure serial peripheral interface, wherein the trusted application is in a core of a second processing unit, and the second processing unit connects to the first processing unit (1506; 2506) through the secure serial peripheral interface; turning on (1208; 2208), by the first processing unit (1506; 2506), a light emitter (1508; 2508) based on the type identifier carried in the control instruction; and capturing (1210; 2210), by the camera (1504; 2504), the target image of an object illuminated by the light emitter (1508; 2508).