CN111373731B - Image processing method, processing system and electronic equipment - Google Patents

Image processing method, processing system and electronic equipment Download PDF

Info

Publication number
CN111373731B
CN111373731B CN201780097104.0A CN201780097104A CN111373731B CN 111373731 B CN111373731 B CN 111373731B CN 201780097104 A CN201780097104 A CN 201780097104A CN 111373731 B CN111373731 B CN 111373731B
Authority
CN
China
Prior art keywords
camera
image
cameras
image processing
generate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201780097104.0A
Other languages
Chinese (zh)
Other versions
CN111373731A (en
Inventor
陆德锁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Transsion Communication Co Ltd
Original Assignee
Shenzhen Transsion Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Transsion Communication Co Ltd filed Critical Shenzhen Transsion Communication Co Ltd
Publication of CN111373731A publication Critical patent/CN111373731A/en
Application granted granted Critical
Publication of CN111373731B publication Critical patent/CN111373731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Abstract

The invention relates to an image processing method, an image processing system and an electronic device. The image processing method comprises the following steps: detecting a camera of the electronic device; when the number of the cameras is detected to be one, identifying the type of the camera; and when the camera is identified as a front camera, rotating the image shot by the camera by 270 degrees to generate a preview image. The image processing system includes: the detection module is used for detecting a camera of the electronic equipment; the identification module is used for identifying the type of the camera when the number of the cameras is detected to be one; and the processing module is used for rotating the image shot by the camera by 270 degrees to generate a preview image when the camera is identified to be the front camera. The invention can accurately identify the type of the camera, thereby accurately processing the image according to different types of the camera, effectively avoiding the presentation error of the image and further improving the performance of the equipment.

Description

Image processing method, processing system and electronic equipment
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to an image processing method, an image processing system, and an electronic device.
Background
With the development and progress of the technology, the intelligent terminals are widely used by people more and more, and the functions of the intelligent terminals are more and more powerful, taking mobile phones as an example, most of the mobile phones at present have cameras to achieve the purpose of taking pictures or taking pictures. With the increasing requirements of people on photographing or photography, a front camera or a rear camera is configured on many mobile phones.
Generally, people use the rear camera more frequently and require higher definition of images, so that the pixels of the rear camera are higher than those of the front camera. At present, after a terminal user purchases a mobile phone, because various uncertain factors cause damage of a rear camera or the rear camera cannot be identified, the terminal user can only use the front shooting, however, the front shooting preview shooting is still inverted, and as a result, the front shooting and the rear shooting cannot be used due to damage of one rear shooting, so that the experience is very poor.
This is because the rear camera on the Google architecture is represented by 0 and the front camera is represented by 1, and since only one camera is installed, regardless of whether a front camera module or a rear camera module is installed, the code architecture cannot be distinguished, and the camera is handled as the rear camera by default, only the front camera is installed and is handled as the rear camera 0. Specifically, referring to fig. 1, a schematic flow chart of image processing when only one camera is detected in the prior art is shown; as shown in fig. 1, the conventional image processing method includes:
step S11, detecting a camera of the electronic equipment; that is, when the mobile phone is started or the camera shooting function is started, the camera is scanned first;
step S12, when detecting that the number of the cameras is only one, determining the camera as a rear camera;
in step S13, the image captured by the camera is rotated by 90 ° to generate a preview image.
In order to ensure that the drawing direction of the front-back shot is correct on the framework platform, unified processing is already carried out, the direction of the rear-back shot is processed by 90 degrees, and the direction of the front-back shot is processed by 270 degrees, so that when only the front shot is installed, the front shot is processed by 270 degrees, the result is recognized as the rear shot by default, and the transmission parameter is 0, so that the 90 degrees are processed, and the front shot preview shooting is inverted.
That is to say, after the rear camera is not recognized or damaged in the prior art, the image shot and formed by the front camera is inverted, so that the user experience is poor.
Disclosure of the invention
The invention aims to provide an image processing method, an image processing system and electronic equipment, which can effectively identify the type of a camera so as to accurately process an image shot by the camera, thereby effectively improving the performance of the electronic equipment.
To achieve the above object, the present invention provides an image processing method comprising: detecting a camera of the electronic device; when the number of the cameras is detected to be one, identifying the type of the camera; and when the camera is identified as a front camera, rotating the image shot by the camera by 270 degrees to generate a preview image.
The image processing method further includes: and when the camera is identified as a rear camera, rotating the image shot by the camera by 90 degrees to generate a preview image.
The image processing method further includes: when the number of the cameras is two, identifying the types of the two cameras respectively; the image recognized as being captured by the front camera is rotated by 270 ° to generate a preview image, or the image recognized as being captured by the rear camera is rotated by 90 ° to generate a preview image.
When the number of the detected cameras is two, the step of respectively identifying the types of the two cameras comprises the following steps: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data.
When the number of the cameras is detected to be one, the step of identifying the type of the camera comprises the following steps: acquiring ID data of the camera; and determining the camera to be a front camera or a rear camera according to the acquired ID data.
The present invention also provides an image processing system comprising: the detection module is used for detecting a camera of the electronic equipment; the identification module is used for identifying the type of the camera when the number of the cameras is detected to be one; and the processing module is used for rotating the image shot by the camera by 270 degrees to generate a preview image when the camera is identified to be the front camera.
And the processing module is also used for rotating the image shot by the camera by 90 degrees to generate a preview image when the camera is identified as the rear camera.
The identification module is also used for respectively identifying the types of the two cameras when the number of the two cameras is detected; the processing module is used for rotating the image shot by the front camera by 270 degrees to generate a preview image, or rotating the image shot by the rear camera by 90 degrees to generate the preview image.
The identification module comprises: an acquisition unit for acquiring the ID data of the camera; and the determining unit is used for determining that the camera is a front camera or a rear camera according to the acquired ID data.
The invention also provides an electronic device comprising an image processing system as claimed in any one of the preceding claims.
In summary, compared with the prior art, the image processing method, the image processing system and the electronic device of the present invention have the following advantages:
the image processing method, the image processing system and the electronic equipment can accurately identify the type of the camera, so that accurate image processing can be performed according to different types of the camera, thereby effectively avoiding image presentation errors and further improving the performance of the equipment.
Brief description of the drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flow chart of image processing when only one camera is detected in the prior art;
FIG. 2 is a schematic diagram of an implementation of an image processing system according to the present invention;
FIG. 3 is a flow chart illustrating an implementation of an image processing method according to the present invention;
fig. 4 is a flowchart illustrating another implementation of the image processing method according to the present invention.
Best mode for carrying out the invention
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that, in this document, relational terms such as "first," "second," "third," and the like, if any, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," "includes," "including," "has," "having" or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising … …" or "comprising … …" does not exclude the presence of additional elements in a process, method, article, or terminal that comprises the element. Further, herein, "greater than," "less than," "more than," and the like are understood to exclude the present numbers; the terms "above", "below", "within" and the like are to be understood as including the number.
The technical solution of the present invention will be described in detail with specific embodiments with reference to fig. 2 to 4. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that there are many kinds of current mobile phone systems, such as: android, java, saiban, ISO and the like, similar to a windows2000 system, a windows vista system and the like of a computer, the android system is often used in a mobile phone, becomes one of the mainstream mobile phone systems at present, and belongs to the field of computer technologyIntelligent system
The image processing system, the image processing method and the electronic device in this embodiment are described by taking an Android (Android) system as an example and a mobile phone architecture platform of Google as an example. Wherein, the Android system generally be applied to the mobile intelligent terminal of cell-phone, or panel computer, or intelligent wearable equipment (including intelligent wrist-watch or intelligent bracelet) etc. contain: a Kernel driver layer (Kernel), which is a hardware driver running layer of the mobile intelligent terminal and is an abstraction layer between hardware and software processes; a Framework layer (Framework) which is a link layer connecting the application layer and the kernel driver layer; and the application program layer (App) is used for running each application process in the mobile intelligent terminal.
Fig. 2 is a schematic structural diagram of an image processing system according to the present invention; the image processing system includes:
the detection module 10 is used for detecting a camera of the electronic equipment;
in this embodiment, the detection module 10 may be implemented by a combination of related hardware and software components, such as an event monitor to implement the detection function of a camera. The event monitor receives event information from a peripheral interface. The event information includes information about a sub-event (e.g., a user touch on the touch-sensitive display system as part of a multi-touch gesture). The peripheral interface transmits information it receives from I/O subsystems or sensors, such as proximity sensors, accelerometers, and/or microphones (through audio circuitry). Information received by the peripheral interface from the I/O subsystem includes, among other things, information from the touch-sensitive display system or the touch-sensitive surface.
In some embodiments, the event monitor sends requests to the peripheral interface at predetermined intervals. In response, the peripheral interface transmits event information. In other embodiments, the peripheral interface transmits event information only when there is a significant event (e.g., receiving an input that exceeds a predetermined noise threshold and/or is longer than a predetermined duration).
The identification module 20 is used for identifying the type of the camera when the number of the cameras is detected to be one;
in this embodiment, the identification module 20 includes: an acquisition unit and a determination unit (not shown in the figure). The acquisition unit is used for acquiring the ID data of the camera; the determining unit is used for determining the camera to be a front camera or a rear camera according to the acquired ID data.
That is, the identification module 20 in the present embodiment accurately determines the type of the detected camera by directly acquiring the ID data of the camera; therefore, the problem that when only one camera exists in the prior art, the camera is defaulted to be a rear camera is solved.
And the processing module 30 is used for rotating the image shot by the camera by 270 degrees to generate a preview image when the camera is identified to be the front camera.
The detection module, the identification module, and the processing module may each be implemented by respective hardware and software components, which may include an operating system, a communication module (or set of instructions), a contact/motion module (or set of instructions), a graphics module (or set of instructions), a user interface state module (or set of instructions), and one or more applications (or sets of instructions). An operating system (e.g., Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or an embedded operating system such as Vxworks) includes various software components and/or drivers for controlling and managing conventional system tasks (e.g., memory management, storage device control, power management, etc.) and facilitating communication between various software and hardware components.
The type of the camera is accurately identified through the identification module 20, so that an accurate basis is provided for the processing of the processing module 30, and then the corresponding processing is performed on the image through the processing module 30, so that the finally generated preview image is accurate, the performance of the equipment is effectively improved, and the user experience is greatly improved.
In this embodiment, the processing module 30 is further configured to rotate an image captured by the camera by 90 ° to generate a preview image when the camera is identified as a rear camera.
If the camera is identified as a rear camera, the processing module 30 rotates the image by 90 degrees according to the identification result to ensure that the finally generated preview image is in the forward direction, so as to improve the user experience.
In this embodiment, the identification module 20 is further configured to identify the types of the two cameras when detecting that the number of the cameras is two; the processing module 30 is further configured to rotate an image captured by the front camera by 270 ° to generate a preview image, or rotate an image captured by the rear camera by 90 ° to generate a preview image.
Specifically, when the number of the cameras detected by the detection module is two, the types of the two cameras are respectively identified by the identification module 20, and the specific identification process is as follows: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data. That is, when two cameras are detected, it is determined that both the front camera and the rear camera are normally operated, and thus, in order to improve the recognition efficiency, the identification data of the cameras can be directly acquired from the architecture platform (for example, in the Google architecture, the identification data of the rear camera is 0, and the identification data of the front camera is 1); the type of the camera can be rapidly and accurately confirmed through the identification data of the camera. After the type of the camera is determined, the processing module 30 performs accurate processing on the data shot by the camera according to the type of the camera, so as to ensure that the final preview image is in the forward direction. If so, rotating the image shot by the front camera by 270 degrees to generate a preview image; and, the image recognized as being photographed by the rear camera is rotated by 90 ° to generate a preview image.
The processing module of the embodiment can be implemented by an image processor, a CPU, an MCU, and the like. More specifically, the processor may execute instructions stored in the memory and/or the non-volatile storage device to perform operations in the computing device, such as generating image data and/or transmitting image data to an electronic display. As such, the processor may include one or more general purpose microprocessors, one or more application specific processors (ASICs), one or more field programmable logic arrays (FPGAs), or any combination thereof. The software components stored in the memory include an operating system, a communication module (or set of instructions), a contact/motion module (or set of instructions), a graphics module (or set of instructions), a haptic feedback module (or set of instructions), a text input module (or set of instructions), a Global Positioning System (GPS) module (or set of instructions), and an application (or set of instructions). Further, in some embodiments, memory or memory stores device/global internal state. The device/global internal state includes one or more of: an active application state indicating the currently active application (if any); a display state indicating which applications, views, or other information occupy various areas of the touch-sensitive display system; sensor status, including information obtained from various sensors and other input or control devices of the device; and position and/or location information relating to the position and/or pose of the device.
The memory may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, the memory may also include memory that is remote from the one or more processors, such as network-attached memory accessed via RF circuitry or external ports and a communication network (not shown), which may be the internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), Storage Area Networks (SANs), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
The operation of the image processing system shown in fig. 2 will be described in further detail with reference to specific embodiments. It is assumed that the image processing system is applied to a smartphone, and the smartphone is configured with a front camera and a rear camera.
Firstly, when the intelligent power-on is started (or the camera shooting function is started), the camera is scanned through the detection module 10; under normal conditions, it has two cameras to scan, and leading camera and rear camera all are described promptly, show that two cameras of smart mobile phone can normal operating this moment, and at this moment, discern the type of two cameras respectively through identification module 20, and the identification process at this moment is: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data. That is, when two cameras are detected, it is determined that both the front camera and the rear camera are normally operated, and thus, in order to improve the recognition efficiency, the identification data of the cameras can be directly acquired from the architecture platform (for example, in the Google architecture, the identification data of the rear camera is 0, and the identification data of the front camera is 1); the type of the camera can be rapidly and accurately confirmed through the identification data of the camera. After the type of the camera is determined, the processing module 30 performs accurate processing on the data shot by the camera according to the type of the camera, so as to ensure that the final preview image is in the forward direction. If so, rotating the image shot by the front camera by 270 degrees to generate a preview image; and, the image recognized as being photographed by the rear camera is rotated by 90 ° to generate a preview image. Through the processing, images shot by the front camera or the rear camera can be positively presented to the user, so that the user experience is improved.
If only one camera is scanned through the detection module 10, it indicates that one camera of the smart phone cannot normally operate, so as to avoid the problem that the image in the prior art cannot be presented in the forward direction. The type of the camera scanned currently needs to be identified; if the type of the camera cannot be accurately acquired by acquiring the identification data from the architecture platform, the identification module 20 needs to acquire the ID data of the camera, and the camera can be accurately determined to be a rear camera or a front camera according to the ID data, and if the acquired camera is the rear camera, the processing module 30 rotates the captured image by 90 degrees to generate a preview image; in contrast, if the acquired camera is a front camera, the processing module 30 needs to rotate the captured image by 270 ° to generate a preview image.
The type of the camera can be accurately judged by acquiring the ID data of the camera, so that an accurate basis is provided for subsequent image processing, the performance of equipment is improved, and the user experience is improved.
The invention also provides an electronic device comprising an image processing system as claimed in any one of the preceding claims. Such electronic devices include, but are not limited to, hand-held computers, tablet computers, mobile phones, smart phones, media players, Personal Digital Assistants (PDAs), and the like, as well as combinations of two or more thereof. In some embodiments, the electronic device is an intelligent device based on an Android operating system (Android operating system), where the Android operating system includes: the Android native operating system and the Android kernel-based improved operating system. Examples of the Android kernel-based improved operating system include but are not limited to: hua is EMUI developed, MIUI developed by millet, etc. Combinations of two or more thereof are also included.
The electronic device typically includes memory, a memory controller, one or more processing units (CPUs), peripheral interfaces, RF circuits, audio circuits, speakers, microphones, input/output (I/O) subsystems, touch screens, other output or control devices, and external ports. These components communicate over one or more communication buses or signal lines. It should be understood that the electronic device in this embodiment is only an example, and in a specific application, the components of the electronic device may have more or less components or have different component configurations; and the various components may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device may also include a power system for powering the various components. The power system may include a power management system, one or more power sources (e.g., battery, Alternating Current (AC)), a charging system, power failure detection circuitry, a power converter or inverter, a power status indicator (e.g., Light Emitting Diode (LED)), and any other components associated with power generation, management, and distribution in a portable device.
As shown in fig. 3, which is a schematic flow chart of an implementation manner of the image processing method provided by the present invention, the image processing method includes:
step S10, detecting a camera of the electronic equipment;
in this embodiment, step S10 may be implemented by a combination of related hardware and software components, such as an event monitor to implement the detection function of the camera. The event monitor receives event information from a peripheral interface. The event information includes information about a sub-event (e.g., a user touch on the touch-sensitive display system as part of a multi-touch gesture). The peripheral interface transmits information it receives from I/O subsystems or sensors, such as proximity sensors, accelerometers, and/or microphones (through audio circuitry). Information received by the peripheral interface from the I/O subsystem includes, among other things, information from the touch-sensitive display system or the touch-sensitive surface.
In some embodiments, the event monitor sends requests to the peripheral interface at predetermined intervals. In response, the peripheral interface transmits event information. In other embodiments, the peripheral interface transmits event information only when there is a significant event (e.g., receiving an input that exceeds a predetermined noise threshold and/or is longer than a predetermined duration).
Step S20, judging whether the number of the cameras is one;
when detecting that the number of the cameras is one, executing step S30 to identify the type of the camera; in other words, whether the camera is a front camera is judged;
specifically, when it is detected that the number of the cameras is one, the step of identifying the type of the camera includes: acquiring ID data of the camera; and determining the camera to be a front camera or a rear camera according to the acquired ID data.
That is, in this embodiment, the type of the detected camera is accurately determined by directly acquiring ID data of the camera; therefore, the problem that when only one camera exists in the prior art, the camera is defaulted to be a rear camera is solved.
When the camera is recognized as the front camera, step S40 is executed, and the image captured by the camera is rotated by 270 ° to generate a preview image.
The type of the camera is accurately identified, so that an accurate basis is provided for subsequent image processing, and the finally generated preview image is ensured to be accurate through corresponding processing of the image, so that the performance of the equipment is effectively improved, and the user experience is greatly improved.
In addition, in this embodiment, the image processing method further includes: and step S50, when the camera is identified as the rear camera, rotating the image shot by the camera by 90 degrees to generate a preview image.
If the camera is identified as a rear camera, the processing module 30 rotates the image by 90 degrees according to the identification result to ensure that the finally generated preview image is in the forward direction, so as to improve the user experience.
Fig. 4 is a schematic flow chart of another implementation of the image processing method provided by the present invention; the image processing method is similar to the image processing method shown in fig. 3, and comprises the following steps: step S10, detecting a camera of the electronic equipment; in this embodiment, the detection module 10 may be implemented by a combination of related hardware and software components, such as an event monitor to implement the detection function of a camera. The event monitor receives event information from a peripheral interface. The event information includes information about a sub-event (e.g., a user touch on the touch-sensitive display system as part of a multi-touch gesture). The peripheral interface transmits information it receives from I/O subsystems or sensors, such as proximity sensors, accelerometers, and/or microphones (through audio circuitry). Information received by the peripheral interface from the I/O subsystem includes, among other things, information from the touch-sensitive display system or the touch-sensitive surface.
In some embodiments, the event monitor sends requests to the peripheral interface at predetermined intervals. In response, the peripheral interface transmits event information. In other embodiments, the peripheral interface transmits event information only when there is a significant event (e.g., receiving an input that exceeds a predetermined noise threshold and/or is longer than a predetermined duration).
Step S20, judging whether the number of the cameras is one;
when detecting that the number of the cameras is one, executing step S30 to identify the type of the camera; in other words, whether the camera is a front camera is judged;
specifically, when it is detected that the number of the cameras is one, the step of identifying the type of the camera includes: acquiring ID data of the camera; and determining the camera to be a front camera or a rear camera according to the acquired ID data.
When the camera is recognized as the front camera, step S40 is executed, and the image captured by the camera is rotated by 270 ° to generate a preview image.
The type of the camera is accurately identified, so that an accurate basis is provided for subsequent image processing, and the finally generated preview image is ensured to be accurate through corresponding processing of the image, so that the performance of the equipment is effectively improved, and the user experience is greatly improved.
In addition, when the camera is identified as a rear camera, step S50: the image taken by the camera is rotated by 90 ° to generate a preview image.
The difference from the method shown in fig. 3 is that: the image processing method of the present embodiment further includes: when detecting that the number of the cameras is two, executing step S60 to identify the types of the two cameras respectively; the image recognized as being captured by the front camera is rotated by 270 ° to generate a preview image, or the image recognized as being captured by the rear camera is rotated by 90 ° to generate a preview image.
When the number of the detected cameras is two, the step of respectively identifying the types of the two cameras comprises the following steps: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data.
Specifically, when the number of the detected cameras is two, the types of the two cameras are respectively identified, and the specific identification process is as follows: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data. That is, when two cameras are detected, it is determined that both the front camera and the rear camera are normally operated, and thus, in order to improve the recognition efficiency, the identification data of the cameras can be directly acquired from the architecture platform (for example, in the Google architecture, the identification data of the rear camera is 0, and the identification data of the front camera is 1); the type of the camera can be rapidly and accurately confirmed through the identification data of the camera. After the type of the camera is determined, the processing module 30 performs accurate processing on the data shot by the camera according to the type of the camera, so as to ensure that the final preview image is in the forward direction. If so, rotating the image shot by the front camera by 270 degrees to generate a preview image; and, the image recognized as being photographed by the rear camera is rotated by 90 ° to generate a preview image.
The image processing method of the present embodiment may be implemented by the aforementioned image processing system, and specifically, may be implemented by an image processor, a CPU, an MCU, and the like. More specifically, the processor may execute instructions stored in the memory and/or the non-volatile storage device to perform operations in the computing device, such as generating image data and/or transmitting image data to an electronic display. As such, the processor may include one or more general purpose microprocessors, one or more application specific processors (ASICs), one or more field programmable logic arrays (FPGAs), or any combination thereof. The software components stored in the memory include an operating system, a communication module (or set of instructions), a contact/motion module (or set of instructions), a graphics module (or set of instructions), a haptic feedback module (or set of instructions), a text input module (or set of instructions), a Global Positioning System (GPS) module (or set of instructions), and an application (or set of instructions). Further, in some embodiments, memory or memory stores device/global internal state. The device/global internal state includes one or more of: an active application state indicating the currently active application (if any); a display state indicating which applications, views, or other information occupy various areas of the touch-sensitive display system; sensor status, including information obtained from various sensors and other input or control devices of the device; and position and/or location information relating to the position and/or pose of the device.
The memory may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, the memory may also include memory that is remote from the one or more processors, such as network-attached memory accessed via RF circuitry or external ports and a communication network (not shown), which may be the internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), Storage Area Networks (SANs), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
In this embodiment, when the intelligent power-on is started (or the camera function is started), the camera is scanned first; under the normal condition, it has two cameras to scan, and leading camera and rear camera all are described promptly, show that two cameras of smart mobile phone can normal operating this moment, and at this moment, the type to two cameras is discerned respectively again, and the identification process at this moment is: respectively acquiring identification data of the two cameras on the architecture platform; and determining the rear camera or the front camera according to the acquired identification data. That is, when two cameras are detected, it is determined that both the front camera and the rear camera are normally operated, and thus, in order to improve the recognition efficiency, the identification data of the cameras can be directly acquired from the architecture platform (for example, in the Google architecture, the identification data of the rear camera is 0, and the identification data of the front camera is 1); the type of the camera can be rapidly and accurately confirmed through the identification data of the camera. After the type of the camera is determined, the processing module 30 performs accurate processing on the data shot by the camera according to the type of the camera, so as to ensure that the final preview image is in the forward direction. If so, rotating the image shot by the front camera by 270 degrees to generate a preview image; and, the image recognized as being photographed by the rear camera is rotated by 90 ° to generate a preview image. Through the processing, images shot by the front camera or the rear camera can be positively presented to the user, so that the user experience is improved.
If only one camera is scanned, it is indicated that one camera of the smart phone cannot normally operate, so as to avoid the problem that the image in the prior art cannot be presented in the forward direction. The type of the camera scanned currently needs to be identified; if the type of the camera cannot be accurately acquired by acquiring the identification data from the architecture platform, the ID data of the camera needs to be acquired, the camera can be accurately judged to be a rear camera or a front camera through the ID data, and if the acquired camera is the rear camera, the processing module 30 rotates the captured image by 90 degrees to generate a preview image; in contrast, if the acquired camera is a front camera, the processing module 30 needs to rotate the captured image by 270 ° to generate a preview image.
The type of the camera can be accurately judged by acquiring the ID data of the camera, so that an accurate basis is provided for subsequent image processing, the performance of equipment is improved, and the user experience is improved.
In summary, the image processing method, the image processing system and the electronic device provided by the invention can accurately acquire the types of the cameras under different conditions by detecting the number of the cameras to distinguish the types of the acquired cameras, thereby effectively ensuring the accurate processing of the final image and greatly improving the user experience; in addition, the processing efficiency can be effectively improved by adopting different camera types, and the performance of the equipment is further improved.
Compared with the prior art, the image processing method, the image processing system and the electronic equipment have the following advantages that: the type of the camera is accurately acquired to provide a basis for a subsequent image processing mode, so that the accuracy of image processing is greatly improved, and the performance of equipment and the experience of a user are improved.
As will be appreciated by one skilled in the art, the above-described embodiments may be provided as a method, apparatus, or computer program product. These embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. All or part of the steps in the methods according to the embodiments may be implemented by a program instructing related hardware, where the program may be stored in a storage medium readable by a computer device and used to execute all or part of the steps in the methods according to the embodiments.
The various embodiments described above are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a computer apparatus to produce a machine, such that the instructions, which execute via the processor of the computer apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (6)

1. An image processing method, comprising:
detecting a camera of the electronic device;
when the number of the cameras is detected to be one, acquiring ID data of the cameras; determining the camera to be a front camera or a rear camera according to the acquired ID data;
when the camera is identified as a front camera, rotating an image shot by the camera by 270 degrees to generate a preview image;
and when the camera is identified as a rear camera, rotating the image shot by the camera by 90 degrees to generate a preview image.
2. The image processing method according to claim 1, further comprising:
when the number of the cameras is two, identifying the types of the two cameras respectively;
the image recognized as being captured by the front camera is rotated by 270 ° to generate a preview image, and/or the image recognized as being captured by the rear camera is rotated by 90 ° to generate a preview image.
3. The image processing method according to claim 2, wherein the step of, when detecting that the number of cameras is two, respectively identifying the types of the two cameras comprises:
respectively acquiring identification data of the two cameras on the architecture platform;
and determining the rear camera or the front camera according to the acquired identification data.
4. An image processing system, comprising:
the detection module is used for detecting a camera of the electronic equipment;
the identification module is used for identifying the type of the camera when the number of the cameras is detected to be one;
the processing module is used for rotating the image shot by the camera by 270 degrees to generate a preview image when the camera is identified to be a front camera; when the camera is identified as a rear camera, rotating an image shot by the camera by 90 degrees to generate a preview image;
the identification module comprises:
an acquisition unit for acquiring the ID data of the camera;
and the determining unit is used for determining that the camera is a front camera or a rear camera according to the acquired ID data.
5. The image processing system of claim 4, wherein the identification module is further configured to identify the types of the two cameras when the number of cameras is detected to be two; the processing module is used for rotating the image shot by the front camera by 270 degrees to generate a preview image and/or rotating the image shot by the rear camera by 90 degrees to generate the preview image.
6. An electronic device characterized by comprising an image processing system according to any one of claims 4 and 5.
CN201780097104.0A 2017-09-27 2017-09-27 Image processing method, processing system and electronic equipment Active CN111373731B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/103601 WO2019061054A1 (en) 2017-09-27 2017-09-27 Image processing method, processing system and electronic device

Publications (2)

Publication Number Publication Date
CN111373731A CN111373731A (en) 2020-07-03
CN111373731B true CN111373731B (en) 2022-03-08

Family

ID=65900405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780097104.0A Active CN111373731B (en) 2017-09-27 2017-09-27 Image processing method, processing system and electronic equipment

Country Status (2)

Country Link
CN (1) CN111373731B (en)
WO (1) WO2019061054A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950345A (en) * 2020-06-28 2020-11-17 北京百度网讯科技有限公司 Camera identification method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070010689A (en) * 2005-07-19 2007-01-24 주식회사 팬택앤큐리텔 Method and apparatus for display image in wireless communication terminal
CN103795922A (en) * 2014-01-24 2014-05-14 厦门美图网科技有限公司 Intelligent correction method for camera lens of mobile terminal
CN105227963A (en) * 2015-08-31 2016-01-06 北京暴风科技股份有限公司 Streaming Media collection is carried out to terminal and automatically identifies direction and the method and system of adjustment
CN105657260A (en) * 2015-12-31 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Shooting method and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070010689A (en) * 2005-07-19 2007-01-24 주식회사 팬택앤큐리텔 Method and apparatus for display image in wireless communication terminal
CN103795922A (en) * 2014-01-24 2014-05-14 厦门美图网科技有限公司 Intelligent correction method for camera lens of mobile terminal
CN105227963A (en) * 2015-08-31 2016-01-06 北京暴风科技股份有限公司 Streaming Media collection is carried out to terminal and automatically identifies direction and the method and system of adjustment
CN105657260A (en) * 2015-12-31 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Shooting method and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
安卓自动选择调用前置或后置摄像头;菜菜菜鸟的博客;《菜菜菜鸟的博客,CSDN,https://blog.csdn.net/nihaomawobuhaoa/article/details/53608584》;20161213;正文第1页 *

Also Published As

Publication number Publication date
WO2019061054A1 (en) 2019-04-04
CN111373731A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
US10958850B2 (en) Electronic device and method for capturing image by using display
CN108289161B (en) Electronic device and image capturing method thereof
CN107786794B (en) Electronic device and method for providing an image acquired by an image sensor to an application
EP3346696A1 (en) Image capturing method and electronic device
US8456512B2 (en) Electronic device for capturing panoramic images
CN108491526B (en) Log data processing method and device, electronic equipment and storage medium
CN104869305B (en) Method and apparatus for processing image data
US20180032797A1 (en) Apparatus and method for processing a beauty effect
CN108427533B (en) Electronic device and method for determining environment of electronic device
WO2012122051A1 (en) Redundant detection filtering
US20190004661A1 (en) Electronic device for providing service and operating method thereof
CN108632529B (en) Electronic device providing a graphical indicator for a focus and method of operating an electronic device
CN111373731B (en) Image processing method, processing system and electronic equipment
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN107861827B (en) Card screen detection method, mobile terminal and computer readable storage medium
US11070736B2 (en) Electronic device and image processing method thereof
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
EP3328066B1 (en) Electronic device and method for autofocusing
CN110674050A (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN112181915A (en) Method, device, terminal and storage medium for executing service
CN117130824A (en) Method for processing exception, electronic equipment and storage medium
US20220279118A1 (en) Image capturing apparatus, method for controlling image capturing apparatus, information processing apparatus
CN114071007A (en) Image processing method, multimedia processing chip and electronic equipment
CN110716908A (en) Log information writing method, system, storage medium and mobile terminal
US20200273202A1 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant