CN109151348B - Image processing method, electronic equipment and computer readable storage medium - Google Patents
Image processing method, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109151348B CN109151348B CN201811142613.3A CN201811142613A CN109151348B CN 109151348 B CN109151348 B CN 109151348B CN 201811142613 A CN201811142613 A CN 201811142613A CN 109151348 B CN109151348 B CN 109151348B
- Authority
- CN
- China
- Prior art keywords
- sub
- light intensity
- pixel
- pixels
- output
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N25/00—Circuitry of solid-state image sensors [SSIS]; Control thereof
- H04N25/70—SSIS architectures; Circuits associated therewith
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The invention provides an image sensor, an image processing method and electronic equipment, and aims to solve the problem that the effect of an image extracted by the electronic equipment is poor. The image sensor comprises at least two sub-pixels, each sub-pixel comprises a photosensitive unit and a light intensity change detection unit, and based on the structure, the electronic equipment reads a first electric signal which is output by each light intensity change detection unit and records the light intensity change; selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value; and generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels. Therefore, when the light intensity value acquired by the sub-pixel changes, the target sub-pixel with the changed light intensity value is controlled to output the electric signal, the image of the shot object can be obtained, and the image does not need to be segmented, so that the image effect is good.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an image sensor, an image processing method, and an electronic device.
Background
With the development of image processing technology, people often need to process the shot image, for example, to replace the background image for the person image, which needs to extract the person image from the original image, i.e., to scratch. The existing matting technology generally detects the edge of an image to be extracted, obtains the edge profile of the image to be extracted, and then extracts the image to be extracted.
However, when the edge of the image to be extracted is complex, the extracted image is poor in effect because it is difficult to accurately identify the edge profile of the image to be extracted.
Disclosure of Invention
The embodiment of the invention provides an image sensor, an image processing method and electronic equipment, and aims to solve the problem that the electronic equipment is difficult to accurately identify the edge profile of an image to be extracted, so that the effect of the extracted image is poor.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image sensor, including at least two sub-pixels, each of which includes a light sensing unit and a light intensity variation detection unit;
the photosensitive unit is used for receiving optical signals and converting the optical signals into electric signals; the light intensity change detection unit is used for detecting the light intensity change of each sub-pixel and outputting a light intensity detection value with a light intensity change value larger than a preset threshold value.
In a second aspect, an embodiment of the present invention further provides an image processing method applied to an electronic device having an image sensor, where each sub-pixel of the image sensor includes a light sensing unit and a light intensity variation detection unit, and the image processing method includes:
reading a first electric signal which is output by each light intensity change detection unit and records the light intensity change;
selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value;
and generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device has an image sensor, each sub-pixel of the image sensor includes a light sensing unit and a light intensity change detection unit, and the electronic device includes:
the first reading module is used for reading the first electric signal which is output by each light intensity change detection unit and used for recording the light intensity change;
the selection module is used for selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, and the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value;
and the generating module is used for generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels.
In a fourth aspect, an embodiment of the present invention further provides another electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the image processing method as described above when executing the computer program.
In a fifth aspect, the embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the image processing method as described above.
In the embodiment of the invention, the image sensor comprises at least two sub-pixels, and each sub-pixel comprises a photosensitive unit and a light intensity change detection unit; the photosensitive unit is used for receiving optical signals and converting the optical signals into electric signals; the light intensity change detection unit is used for detecting the light intensity change of each sub-pixel and outputting a light intensity detection value with a light intensity change value larger than a preset threshold value. Based on the structure, the electronic equipment reads the first electric signal which is output by each light intensity change detection unit and records the light intensity change; selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value; and generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels. Therefore, the electronic equipment can acquire the electric signal output by each sub-pixel, and when the light intensity value acquired by the sub-pixel changes, the target sub-pixel with the changed light intensity value is controlled to output the electric signal, so that the image of the shot object can be obtained.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is one of structural diagrams of an image sensor provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an image sensor provided in an embodiment of the present invention;
FIG. 3 is a second block diagram of an image sensor according to an embodiment of the present invention;
fig. 4 is a third structural diagram of an image sensor according to an embodiment of the present invention;
FIG. 5 is a flow chart of an image processing method provided by an embodiment of the invention;
FIG. 6 is a schematic diagram illustrating an effect of image processing according to an embodiment of the present invention;
FIG. 7 is a block diagram of an electronic device according to an embodiment of the present invention;
FIG. 8 is a second block diagram of an electronic device according to an embodiment of the present invention;
fig. 9 is a block diagram of a generation module in the electronic device according to the embodiment of the present invention;
FIG. 10 is a third block diagram of an electronic device according to an embodiment of the present invention;
fig. 11 is a fourth structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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, 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.
Referring to fig. 1, fig. 1 is a structural diagram of each sub-pixel in an image sensor provided in an embodiment of the present invention, where the image sensor includes at least two sub-pixels, and each sub-pixel includes a light sensing unit 1 and a light intensity variation detection unit 2;
the photosensitive unit 1 is used for receiving optical signals and converting the optical signals into electric signals; the light intensity change detection unit 2 is configured to detect a light intensity change of each of the sub-pixels, and output a light intensity detection value having a light intensity change value greater than a preset threshold.
The working principle of a CMOS (Complementary Metal Oxide Semiconductor) in the prior art is shown in fig. 2, and signals are output row by row or column by controlling the on/off of row-column switches through an X shift register and a Y shift register.
In an image sensor in the prior art, a photodiode (a photodiode) is used as a photosensitive element, which is equivalent to a capacitor, the capacitor is charged first, then exposure time of a certain time is given to discharge the photodiode, and finally a voltage difference value is read out, wherein the magnitude of the voltage difference value reflects light intensity, the light intensity is larger, the voltage difference value is larger, the light intensity is smaller, and the voltage difference value is smaller. In a scanning output mode such as progressive, interlaced, column-by-column or interlaced scanning output, only data of one row or one column can be output, but data of each pixel cannot be acquired, and single-point noise of data output is amplified and output after the data is read out from one row or one column, which results in poor image effect.
In the embodiment of the invention, the image sensor comprises at least two sub-pixels, each sub-pixel is provided with a photosensitive unit and a light intensity change detection unit, and a corresponding circuit, and data is output to a single sub-pixel for data output. In a specific implementation, the light sensing unit and the light intensity change detection unit may be disposed for each sub-pixel constituting a pixel, for example, each pixel includes 4 sub-pixels, and the light sensing unit and the light intensity change detection unit may be disposed for each sub-pixel in the 4 sub-pixels to read the luminance change.
The light intensity change detection unit can be used for monitoring the light intensity change condition of each sub-pixel, and therefore the light intensity change value is larger than the light intensity detection value of the preset threshold value. For example, whether the light intensity change occurs within a preset time period is monitored, so that the current light intensity detection value is output when the light intensity change value is detected to be larger than a preset threshold value; or when the change value of the current light intensity detection value relative to the last output light intensity value is detected to be larger than the preset threshold value, the current light intensity detection value is output.
When the shot object moves, the light sensing unit of the image sensor acquires light signals, the light intensity change detection unit detects that the light intensity of the shot object changes, so that a light intensity detection value corresponding to the shot object is output, and the sub-pixels with little or no light intensity change do not output the light intensity detection value, so that the shot object and the background are segmented, the image segmentation efficiency is high, and the obtained image is good in effect. Since each sub-pixel can output data, the resulting image has a high pixel. For example, in the process of driving a car at a high speed, since the light intensity of the sub-pixel corresponding to the car position changes, and the sub-pixel corresponding to the background where the car is located does not change in light intensity or changes slightly, the obtained image only contains the car and does not contain the car background. Therefore, the segmentation of the automobile and the background can be quickly realized, and the obtained automobile image has good effect.
Alternatively, as shown in fig. 3, the light intensity change detecting unit 2 includes:
the operation unit 21 is connected with the photosensitive unit 1 and used for determining a light intensity detection value according to the electric signal output by the photosensitive unit;
a storage unit 22 connected to the arithmetic unit 21 for storing the last output light intensity detection value of the arithmetic unit;
a comparing unit 23, connected to the operating unit 21 and the storage unit 22, for comparing the current output light intensity detection value of the operating unit with the last output light intensity detection value stored in the storage unit, and obtaining a difference value between the current output light intensity detection value and the last output light intensity detection value;
and the output unit 24 is connected with the comparison unit 23 and is used for outputting the current light intensity detection value under the condition that the comparison unit compares that the difference value is greater than or equal to the preset threshold value.
The computing unit is used for computing the electric signal output by the photosensitive unit to obtain a light intensity detection value, for example, converting the electric signal into a voltage value reflecting the light intensity. The light intensity detection value output last time can be understood as the light intensity detection value output last time at the present time, and can also be the light intensity detection value obtained, and is not limited to the light intensity detection value output last time at the present time. And under the condition that the difference value between the currently output light intensity detection value obtained by the comparison unit and the last output light intensity detection value is greater than or equal to the preset threshold value, indicating that the sub-pixel corresponding to the comparison unit detects that the light intensity change is large, and outputting the current light intensity detection value by the image sensor.
Therefore, each sub-pixel of the image sensor can monitor the dynamic object in real time, and when the light intensity received by a single sub-pixel changes, the light intensity detection value is output, so that the image sensor can acquire the light intensity detection values output by all the sub-pixels with changed light intensity, and generate an image by using the light intensity detection values, and the image of the shot object can be quickly acquired without image segmentation again. And when the shot object changes at a high speed, a clear image can still be obtained. For the sub-pixel without light intensity change, only the last recorded value is reserved, and the current light intensity detection value is not output, so that data redundancy is not caused, and the data processing efficiency can be improved.
For example, in the process of high-speed driving of an automobile, only a very fuzzy automobile image can be obtained by adopting the prior art, namely the automobile image has a smear.
Optionally, each of the sub-pixels further includes:
the judging unit is connected with the comparing unit and the output unit and is used for judging whether the currently output light intensity detection value is in a preset range or not under the condition that the difference value compared by the comparing unit is larger than or equal to a preset threshold value;
and the output unit is used for outputting the current light intensity detection value under the condition that the comparison unit compares that the difference value is larger than or equal to the preset threshold value and the current output light intensity detection value is in the preset range.
In this embodiment, each sub-pixel further includes a determining unit, and the determining unit determines whether the currently output light intensity detection value is within a preset range, where the light intensity value within the preset range has a better effect. When the light intensity detection value is within the preset range, the light and shade effect of the generated image is good.
In order to facilitate an understanding of the embodiments of the present invention, the following description is given by way of example only.
As shown in fig. 4, the light sensing element 41 receives a light signal and converts the light signal into an electrical signal. The logarithmic comparator is used for calculating the electric signal converted by the photosensitive element 41 to obtain a light intensity detection value. The change detector is used for detecting the current light intensity detection value and the change value of the last acquired light intensity detection value, and outputting the current light intensity detection value when the change value is larger than a preset threshold value. VHAnd VLThe upper limit and the lower limit are respectively used for controlling the voltage corresponding to the light intensity detection value, and the voltage corresponding to the light intensity detection value which is controlled and output is positioned in a preset range formed by the upper limit and the lower limit. The Force-fire is power supply voltage, and the confirming unit is used for outputting prompt information of current light intensity change so that the reading unit reads out a light intensity detection value obtained by the operation of the logarithmic comparator and outputs the light intensity detection value to the bus.
According to the embodiment of the invention, the photosensitive unit and the light intensity change detection unit are arranged for each sub-pixel, the light intensity change of each sub-pixel is detected, the sub-pixel with the light intensity change can be controlled to output the light intensity detection value, so that an image is generated, the sub-pixel without the light intensity change does not output the light intensity detection value, the data redundancy is reduced, and the data processing efficiency is improved. And the image only containing the shot object with the changed light intensity can be obtained, the image does not need to be divided again, and the efficiency of image processing is improved. In addition, the embodiment of the invention can quickly acquire the foreground image aiming at the scene with more complex foreground images by controlling the single-point sub-pixels, and the edge effect of the image is better.
Referring to fig. 5, fig. 5 is a flowchart of an image processing method applied to an electronic device having an image sensor, each sub-pixel of the image sensor includes a light sensing unit and a light intensity variation detection unit, as shown in fig. 5, the image processing method includes the following steps:
The electronic device in the embodiment of the present invention may include the image sensor described in the above embodiment, and the explanation and the structure of each sub-pixel may be referred to the description in the above embodiment. The recording of the light intensity variation may be for recording a difference between a currently acquired light intensity detection value and an already acquired light intensity detection value, for example, a difference between the current light intensity detection value and a last output light intensity detection value. In this step, the first electrical signal recording the above difference may be read. Since each sub-pixel includes the light intensity change detection unit, each light intensity change detection unit can acquire the light intensity change condition of the corresponding sub-pixel.
Optionally, before reading the first electrical signal output by each of the light intensity change detection units and recording the light intensity change, the method further includes:
reading a third electric signal which is output by a light intensity change detection unit corresponding to a part of sub-pixels and records the light intensity change;
the reading of the first electric signal, which is outputted from each of the light intensity change detecting units and records the change in light intensity, includes:
and under the condition that the corresponding electric signal of which the intensity value is greater than or equal to the preset threshold exists in the third electric signal, reading the first electric signal which is output by each light intensity change detection unit and records the light intensity change in all the sub-pixels of the image sensor.
In this embodiment, the electronic device may only turn on some of the sub-pixels, and the other sub-pixels are in the off state, and the light intensity variation is monitored in real time by the light intensity variation detecting units of the turned on sub-pixels. If the intensity value of the electric signal in the third electric signal output by the opened partial sub-pixels is larger than or equal to the preset threshold value, the light intensity change is shown, namely, the moving shot object exists. At this time, the electronic device turns on all the sub-pixels of the image sensor, and further obtains the light intensity variation of each sub-pixel in all the sub-pixels.
For ease of understanding, the following description will be given in terms of specific embodiments.
For example, the image sensor is composed of 1920 × 1080 pixels, and the electronic device uniformly selects 220 × 160 pixels of the image sensor and controls the pixels to be turned on, and the other pixels to be turned off. When a person is in front of the electronic device, the turned-on partial pixels monitor the brightness change condition in real time, and when the light intensity changes, the brightness value is filtered according to the preset brightness threshold value, so that the effect shown in fig. 6 is obtained. Since the background image has no light intensity change or the light intensity change is small, the brightness value is not output and the effect of darkness is displayed. This allows the presence of a person or moving object to be detected quickly. After detecting that a moving object exists, 1920 x 1080 pixels can be further opened for identification. Due to the fact that the number of the pixels is low, the obtained image is low in definition, only the outline of a person can be identified, a high-resolution image can be obtained after all the pixels are adopted to work, and the five-sense-organ characteristics of the person, such as eyes, a nose and the like, can be obtained.
Therefore, the existence of the moving object is detected through the low-pixel image sensor, and the power consumption can be saved.
In addition, the partial sub-pixels can be understood as reading only data output by the partial sub-pixels when all the sub-pixels of the image sensor are turned on, and the data are used for preliminarily judging whether the shot object has light intensity change, namely whether a moving shot object exists. In the case where the sub-pixels detect that there is a change in light intensity, the data output by all the sub-pixels is read. Therefore, data redundancy can be reduced, an image of a shot object can be obtained quickly, and power consumption is saved.
Optionally, the partial sub-pixels are sub-pixels evenly distributed in a sub-pixel set of the image sensor, and an interval between adjacent sub-pixels in the partial sub-pixels is greater than a preset threshold.
In this embodiment, the partial sub-pixels may be sub-pixels uniformly distributed in all sub-pixel sets of the image sensor, so that the accuracy of determining the light intensity variation can be improved.
In addition, in the partial sub-pixels, the interval between every two adjacent sub-pixels is greater than a preset threshold, wherein the preset threshold can be a value preset by the electronic device, so that the pixels of the image sensor can be controlled, and the power consumption of the electronic device can be saved.
The sub-pixel set may be all sub-pixels of the image sensor, and in a case where only a part of the sub-pixels are turned on, the sub-pixel set may be all sub-pixels in an on state.
In this step, a sub-pixel, i.e. a target sub-pixel, of which the intensity value of the light intensity variation is greater than or equal to a preset threshold value is selected from the set of sub-pixels of the image sensor.
And 503, generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels.
In this step, since the light intensity corresponding to the target sub-pixel has a large variation, an image is generated using the second electrical signal output from the light sensing unit of the target sub-pixel, and an image including only the photographic subject having a large variation value of light intensity can be obtained.
For example, in a scene in which a person runs, when the electronic device collects a person image, the light intensity variation value of the sub-pixel corresponding to the person image is large, the light intensity variation of the sub-pixel corresponding to the background image is small, a single sub-pixel with large light intensity variation can be controlled to output an electric signal, and the sub-pixel with small light intensity variation or without light intensity variation does not output an electric signal, so that only the person image can be output without outputting the background image.
For another example, in a scene in which an automobile runs in a tunnel, the automobile and the tunnel move relatively, and in the process of acquiring an image, an electronic device in the automobile generates a light intensity change in the image of the tunnel, so that the image including the tunnel can be output.
In specific implementation, the circuit can be used for controlling the second signal output by the photosensitive unit to be in a preset range, so that the brightness of the light is in the preset range, but the brightness is not too bright or dark, and the obtained image has a good effect.
Optionally, the generating an image by using the second electrical signal output by the photosensitive unit corresponding to the target sub-pixel includes:
acquiring average signal intensity values of Q second electric signals output by the photosensitive units corresponding to Q sub-pixels forming the pixel, wherein Q is an integer greater than 1;
controlling each of the Q subpixels to output an electrical signal of the average signal intensity value;
and generating an image by using the electric signal of the average signal intensity value.
In this embodiment, among Q sub-pixels constituting a pixel, the light sensing unit of each sub-pixel outputs the second electrical signal, and then Q second electrical signals can be obtained for each pixel. Since the data read by each sub-pixel is different, the average filtering output can be performed, that is, the electronic device obtains the average signal intensity value of the Q second electrical signals, and generates an image by using the electrical signals with the average signal intensity value.
For example, one pixel is composed of 4 subpixels of 4 RGGB colors, signal intensity values output by the 4 subpixels constituting the pixel are respectively 100, 20, 70, and 10, and then the average signal intensity value is (100+20+70+10)/4 ═ 50, and the image is restored by taking 50 as the signal intensity output by each of the 4 subpixels.
Therefore, the brightness of the image can be more uniform, the noise of the image can be reduced, and the obtained image effect is better.
Optionally, after selecting a target subpixel from the set of subpixels of the image sensor according to the first electrical signal, the method further includes:
and deleting the intensity values of the second electric signals output by the rest of the sub-pixels except the target sub-pixel in the sub-pixel set.
In this embodiment, the electronic device may turn on all the sub-pixels of the image sensor, extract the second electrical signal of the target sub-pixel in the sub-pixel set for generating an image after acquiring the first electrical signal corresponding to each sub-pixel in all the sub-pixel sets, and delete the data of the second electrical signals of the sub-pixels except the target sub-pixel, that is, not read the data of the second electrical signals of the sub-pixels except the target sub-pixel, so as to reduce data redundancy and improve the efficiency of data processing.
In the embodiment of the invention, each sub-pixel of the image sensor can monitor the dynamic object in real time, and the light intensity detection value is output when the light intensity received by a single sub-pixel is changed, so that the image sensor can acquire the light intensity detection values output by all the sub-pixels with changed light intensity and generate an image by using the light intensity detection values, and the image of the shot object can be quickly acquired without image segmentation again. And a clear image can be obtained only when the shot object changes at a high speed. For the sub-pixel without light intensity change, only the last recorded value is reserved, and the current light intensity detection value is not output, so that data redundancy is not caused, and the data processing efficiency can be improved.
For example, in the process of high-speed driving of an automobile, only a very fuzzy automobile image can be obtained by adopting the prior art, namely the automobile image has a smear.
Because the invention is controlled by the single-point sub-pixel, the electric signal reflecting the light intensity can be output when each sub-pixel detects the light intensity change, compared with the signal output mode of row by row or column by column in the prior art, the sensitivity is stronger, therefore, the light intensity change value can be more easily detected even in dark environment, and the electric signal reflecting the light intensity is output to generate the image. In addition, because the shot object performs diffuse reflection on light in different degrees, different materials have different diffuse reflection effects on light, and the conditions of reflecting light intensity changes are different, for example, people are sensitive to reflect light intensity changes, and tunnel reflected light intensity changes made of concrete materials are relatively insensitive, so that different images obtained in the actual shooting process have different effects, and the setting can be performed according to different scenes when setting light intensity change thresholds.
The image processing method can quickly obtain the image of the moving object, has small data redundancy and high processing efficiency, and can be applied to scenes such as traffic monitoring, automobile driving records and the like. In addition, the method can also be applied to shooting objects moving at high speed such as bullets.
In the embodiment of the present invention, the image processing method may be applied to an electronic device, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
In the image processing method of the embodiment of the invention, the electronic equipment reads the first electric signal which is output by each light intensity change detection unit and used for recording the light intensity change; selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value; and generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels. Therefore, the electronic equipment can acquire the electric signal output by each sub-pixel, and when the light intensity value acquired by the sub-pixel changes, the target sub-pixel with the changed light intensity value is controlled to output the electric signal, so that the image of the shot object can be obtained.
Referring to fig. 7, fig. 7 is a structural diagram of an electronic device provided with an image sensor, each sub-pixel of the image sensor includes a light sensing unit and a light intensity change detection unit. As shown in fig. 7, the electronic device 700 includes: a first reading module 701, a selection module 702 and a generation module 703.
A first reading module 701, configured to read a first electrical signal, which is output by each of the light intensity change detection units and records a light intensity change;
a selecting module 702, configured to select a target subpixel from a subpixel set of the image sensor according to the first electrical signal, where an intensity value of the first electrical signal corresponding to the target subpixel is greater than or equal to a preset threshold;
a generating module 703, configured to generate an image by using the second electrical signal output by the light sensing unit corresponding to the target sub-pixel.
Optionally, as shown in fig. 8, the electronic device further includes:
a second reading module 704, configured to read a third electrical signal, which is output by the light intensity change detection unit corresponding to the sub-pixels and records the light intensity change;
the first reading module 701 is specifically configured to, when an electrical signal whose corresponding intensity value is greater than or equal to the preset threshold exists in the third electrical signal, read a first electrical signal that records a change in light intensity and is output by each light intensity change detection unit in all sub-pixels of the image sensor.
Optionally, the partial sub-pixels are sub-pixels evenly distributed in a sub-pixel set of the image sensor, and an interval between adjacent sub-pixels in the partial sub-pixels is greater than a preset threshold.
Optionally, as shown in fig. 9, the generating module 703 includes:
the obtaining sub-module 7031 is configured to obtain average signal intensity values of Q second electrical signals output by the light sensing units corresponding to Q sub-pixels forming a pixel, where Q is an integer greater than 1;
an output sub-module 7032, configured to control each of the Q sub-pixels to output an electrical signal of the average signal intensity value;
a generating sub-module 7033 is used for generating an image by using the electric signal of the average signal intensity value.
Optionally, as shown in fig. 10, the electronic device further includes:
and a deleting module 705, configured to delete intensity values of the second electrical signals output by the remaining sub-pixels except the target sub-pixel in the sub-pixel set.
The electronic device 700 can implement each process implemented by the electronic device in the above method embodiments, and details are not described here to avoid repetition.
According to the electronic device 700 of the embodiment of the invention, since the electronic device can acquire the electric signal output by each sub-pixel, when the light intensity value acquired by the sub-pixel changes, the target sub-pixel with the changed light intensity value is controlled to output the electric signal, so that the image of the shot object can be obtained, and the image does not need to be segmented, so that the image effect is better.
Fig. 11 is a schematic diagram of a hardware structure of an electronic device 1100 for implementing various embodiments of the present invention, where the electronic device 1100 includes, but is not limited to: radio frequency unit 1101, network module 1102, audio output unit 1103, input unit 1104, sensor 1105, display unit 1106, user input unit 1107, interface unit 1108, memory 1109, processor 1110, and power supply 1111. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 11 does not constitute a limitation of electronic devices, which may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted mobile terminal, a wearable device, a pedometer, and the like.
The processor 1110 is configured to read the first electrical signal, which is output by each of the light intensity change detection units and records the light intensity change; selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value; and generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels.
Therefore, the electronic equipment can acquire the electric signal output by each sub-pixel, and when the light intensity value acquired by the sub-pixel changes, the target sub-pixel with the changed light intensity value is controlled to output the electric signal, so that the image of the shot object can be obtained.
Optionally, before the processor 1110 executes the reading of the first electrical signal output by each of the light intensity change detection units and used for recording the light intensity change, the method further includes:
reading a third electric signal which is output by a light intensity change detection unit corresponding to a part of sub-pixels and records the light intensity change;
the reading of the first electric signal, which is outputted from each of the light intensity change detecting units and records the change in light intensity, includes:
and under the condition that the corresponding electric signal of which the intensity value is greater than or equal to the preset threshold exists in the third electric signal, reading the first electric signal which is output by each light intensity change detection unit and records the light intensity change in all the sub-pixels of the image sensor.
Optionally, the partial sub-pixels are sub-pixels evenly distributed in a sub-pixel set of the image sensor, and an interval between adjacent sub-pixels in the partial sub-pixels is greater than a preset threshold.
Optionally, the processor 1110 executes the image generation by using the second electric signal output by the light sensing unit corresponding to the target sub-pixel, including:
acquiring average signal intensity values of Q second electric signals output by the photosensitive units corresponding to Q sub-pixels forming the pixel, wherein Q is an integer greater than 1;
controlling each of the Q subpixels to output an electrical signal of the average signal intensity value;
and generating an image by using the electric signal of the average signal intensity value.
Optionally, after the processor 1110 performs the selecting of the target sub-pixel from the sub-pixel set of the image sensor according to the first electrical signal, the method further includes:
and deleting the intensity values of the second electric signals output by the rest of the sub-pixels except the target sub-pixel in the sub-pixel set.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 1101 may be configured to receive and transmit signals during a message transmission or a call, and specifically, receive downlink data from a base station and then process the received downlink data to the processor 1110; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 1101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 1101 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 1102, such as to assist the user in sending and receiving e-mail, browsing web pages, and accessing streaming media.
The audio output unit 1103 may convert audio data received by the radio frequency unit 1101 or the network module 1102 or stored in the memory 1109 into an audio signal and output as sound. Also, the audio output unit 1103 may also provide audio output related to a specific function performed by the electronic device 1100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 1103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 1104 is used to receive audio or video signals. The input Unit 1104 may include a Graphics Processing Unit (GPU) 11041 and a microphone 11042, and the Graphics processor 11041 processes image data of still pictures or video obtained by an image capturing device, such as a camera, in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 1106. The image frames processed by the graphic processor 11041 may be stored in the memory 1109 (or other storage medium) or transmitted via the radio frequency unit 1101 or the network module 1102. The microphone 11042 may receive sound and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 1101 in case of the phone call mode.
The electronic device 1100 also includes at least one sensor 1105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 11061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 11061 and/or the backlight when the electronic device 1100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 1105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., and will not be described in detail herein.
The display unit 1106 is used to display information input by a user or information provided to the user. The Display unit 1106 may include a Display panel 11061, and the Display panel 11061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 1107 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function control of the electronic apparatus. Specifically, the user input unit 1107 includes a touch panel 11071 and other input devices 11072. The touch panel 11071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 11071 (e.g., operations by a user on or near the touch panel 11071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 11071 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1110, and receives and executes commands sent from the processor 1110. In addition, the touch panel 11071 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 1107 may include other input devices 11072 in addition to the touch panel 11071. In particular, the other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 11071 can be overlaid on the display panel 11061, and when the touch panel 11071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 1110 to determine the type of the touch event, and then the processor 1110 provides a corresponding visual output on the display panel 11061 according to the type of the touch event. Although the touch panel 11071 and the display panel 11061 are shown in fig. 11 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 11071 and the display panel 11061 may be integrated to implement the input and output functions of the electronic device, and the embodiment is not limited herein.
The interface unit 1108 is an interface for connecting an external device to the electronic apparatus 1100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Interface unit 1108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within electronic device 1100 or may be used to transmit data between electronic device 1100 and external devices.
The memory 1109 may be used to store software programs as well as various data. The memory 1109 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory 1109 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1110 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 1109 and calling data stored in the memory 1109, thereby integrally monitoring the electronic device. Processor 1110 may include one or more processing units; preferably, the processor 1110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1110.
The electronic device 1100 may further include a power supply 1111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 1111 may be logically connected to the processor 1110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
In addition, the electronic device 1100 includes some functional modules that are not shown, and thus are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 1110, a memory 1109, and a computer program that is stored in the memory 1109 and is executable on the processor 1110, where the computer program, when executed by the processor 1110, implements each process in the above-described image processing method embodiment, and can achieve the same technical effect, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. An image processing method applied to an electronic device having an image sensor, wherein each sub-pixel of the image sensor includes a light sensing unit and a light intensity variation detection unit, the image processing method comprising:
reading a first electric signal which is output by each light intensity change detection unit and records the light intensity change;
selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, wherein the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value;
generating an image by using a second electric signal output by the photosensitive unit corresponding to the target sub-pixel;
before reading the first electrical signal output by each of the light intensity change detection units and recording the light intensity change, the method further comprises the following steps:
reading a third electric signal which is output by a light intensity change detection unit corresponding to a part of sub-pixels and records the light intensity change;
the reading of the first electric signal, which is outputted from each of the light intensity change detecting units and records the change in light intensity, includes:
and under the condition that the corresponding electric signal of which the intensity value is greater than or equal to the preset threshold exists in the third electric signal, reading the first electric signal which is output by each light intensity change detection unit and records the light intensity change in all the sub-pixels of the image sensor.
2. The method according to claim 1, wherein the partial sub-pixels are evenly distributed sub-pixels in a sub-pixel set of the image sensor, and an interval between adjacent sub-pixels in the partial sub-pixels is greater than a preset threshold.
3. The method according to claim 1, wherein the generating an image by using the second electrical signal output by the photosensitive unit corresponding to the target sub-pixel comprises:
acquiring average signal intensity values of Q second electric signals output by the photosensitive units corresponding to Q sub-pixels forming the pixel, wherein Q is an integer greater than 1;
controlling each of the Q subpixels to output an electrical signal of the average signal intensity value;
and generating an image by using the electric signal of the average signal intensity value.
4. The method of claim 1, wherein after selecting a target subpixel from the set of subpixels of the image sensor according to the first electrical signal, the method further comprises:
and deleting the intensity values of the second electric signals output by the rest of the sub-pixels except the target sub-pixel in the sub-pixel set.
5. An electronic device having an image sensor, wherein each sub-pixel of the image sensor includes a light-sensing unit and a light intensity change detection unit, the electronic device comprising:
the first reading module is used for reading the first electric signal which is output by each light intensity change detection unit and used for recording the light intensity change;
the selection module is used for selecting a target sub-pixel from a sub-pixel set of the image sensor according to the first electric signal, and the intensity value of the first electric signal corresponding to the target sub-pixel is greater than or equal to a preset threshold value;
the generating module is used for generating an image by using the second electric signals output by the photosensitive units corresponding to the target sub-pixels;
the electronic device further includes:
the second reading module is used for reading a third electric signal which is output by the light intensity change detection unit corresponding to the partial sub-pixels and used for recording the light intensity change;
the first reading module is specifically configured to, when an electrical signal whose corresponding intensity value is greater than or equal to the preset threshold exists in the third electrical signal, read a first electrical signal that records a change in light intensity and is output by each light intensity change detection unit in all sub-pixels of the image sensor.
6. The electronic device of claim 5, wherein the portion of the sub-pixels are evenly distributed sub-pixels in a set of sub-pixels of the image sensor, and a spacing between adjacent sub-pixels in the portion of the sub-pixels is greater than a preset threshold.
7. The electronic device of claim 5, wherein the generating module comprises:
the obtaining submodule is used for obtaining the average signal intensity value of Q second electric signals output by the photosensitive units corresponding to Q sub-pixels forming the pixel, wherein Q is an integer larger than 1;
an output sub-module for controlling each of the Q sub-pixels to output an electrical signal of the average signal intensity value;
and the generation submodule is used for generating an image by using the electric signal of the average signal intensity value.
8. The electronic device of claim 5, further comprising:
and the deleting module is used for deleting the intensity values of the second electric signals output by the sub-pixels except the target sub-pixel in the sub-pixel set.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps in the image processing method according to any of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps in the image processing method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811142613.3A CN109151348B (en) | 2018-09-28 | 2018-09-28 | Image processing method, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811142613.3A CN109151348B (en) | 2018-09-28 | 2018-09-28 | Image processing method, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109151348A CN109151348A (en) | 2019-01-04 |
CN109151348B true CN109151348B (en) | 2021-01-08 |
Family
ID=64813518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811142613.3A Active CN109151348B (en) | 2018-09-28 | 2018-09-28 | Image processing method, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109151348B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110763213A (en) * | 2019-11-13 | 2020-02-07 | 刘洁 | Movable surgical ward acceptance platform |
CN111182206B (en) * | 2019-12-31 | 2021-06-25 | 维沃移动通信有限公司 | Image processing method and device |
CN111510650B (en) * | 2020-04-26 | 2021-06-04 | 豪威芯仑传感器(上海)有限公司 | Image sensor |
CN113777621B (en) * | 2020-06-09 | 2024-06-18 | 北京小米移动软件有限公司 | Electronic device, relative position relation detection method, relative position relation detection device and storage medium |
CN117500122B (en) * | 2023-10-25 | 2024-10-11 | 箭牌家居集团股份有限公司 | Light control method for shower room, shower room and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1788498A (en) * | 2003-06-30 | 2006-06-14 | 大塚电子株式会社 | System and method for measuring/evaluating moving image quality of screen |
CN101009776A (en) * | 2006-01-23 | 2007-08-01 | 精工爱普生株式会社 | Image capturing element, image capturing apparatus, image capturing method, image capturing system, and image processing apparatus |
CN101834986A (en) * | 2009-03-11 | 2010-09-15 | 索尼公司 | Imaging device, mobile body detecting method, mobile body detecting circuit and program |
CN105096355A (en) * | 2014-05-08 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN105100586A (en) * | 2014-05-21 | 2015-11-25 | 卡西欧计算机株式会社 | Detection device and detection method |
CN105830433A (en) * | 2014-04-11 | 2016-08-03 | Hoya株式会社 | Image processing device |
CN106851050A (en) * | 2017-03-13 | 2017-06-13 | 广东欧珀移动通信有限公司 | Method for testing motion and device, mobile device |
CN108449557A (en) * | 2018-03-23 | 2018-08-24 | 上海芯仑光电科技有限公司 | Pixel Acquisition Circuit, light stream sensor and light stream and image information collecting system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8493209B2 (en) * | 2010-09-09 | 2013-07-23 | Enlighted, Inc. | Distributed lighting control of a corridor or open areas |
-
2018
- 2018-09-28 CN CN201811142613.3A patent/CN109151348B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1788498A (en) * | 2003-06-30 | 2006-06-14 | 大塚电子株式会社 | System and method for measuring/evaluating moving image quality of screen |
CN101009776A (en) * | 2006-01-23 | 2007-08-01 | 精工爱普生株式会社 | Image capturing element, image capturing apparatus, image capturing method, image capturing system, and image processing apparatus |
CN101834986A (en) * | 2009-03-11 | 2010-09-15 | 索尼公司 | Imaging device, mobile body detecting method, mobile body detecting circuit and program |
CN105830433A (en) * | 2014-04-11 | 2016-08-03 | Hoya株式会社 | Image processing device |
CN105096355A (en) * | 2014-05-08 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN105100586A (en) * | 2014-05-21 | 2015-11-25 | 卡西欧计算机株式会社 | Detection device and detection method |
CN106851050A (en) * | 2017-03-13 | 2017-06-13 | 广东欧珀移动通信有限公司 | Method for testing motion and device, mobile device |
CN108449557A (en) * | 2018-03-23 | 2018-08-24 | 上海芯仑光电科技有限公司 | Pixel Acquisition Circuit, light stream sensor and light stream and image information collecting system |
Also Published As
Publication number | Publication date |
---|---|
CN109151348A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110913132B (en) | Object tracking method and electronic equipment | |
CN109151348B (en) | Image processing method, electronic equipment and computer readable storage medium | |
CN112040223B (en) | Image processing method, terminal device and storage medium | |
CN108495029B (en) | Photographing method and mobile terminal | |
CN111314610B (en) | Control method and electronic equipment | |
CN109688322B (en) | Method and device for generating high dynamic range image and mobile terminal | |
CN107977652B (en) | Method for extracting screen display content and mobile terminal | |
CN108257104B (en) | Image processing method and mobile terminal | |
CN111601032A (en) | Shooting method and device and electronic equipment | |
CN111443765A (en) | Electronic equipment and screen display method | |
CN110519503B (en) | Method for acquiring scanned image and mobile terminal | |
CN109246351B (en) | Composition method and terminal equipment | |
CN110830713A (en) | Zooming method and electronic equipment | |
CN110868546B (en) | Shooting method and electronic equipment | |
CN111401463A (en) | Method for outputting detection result, electronic device, and medium | |
CN111145151B (en) | Motion area determining method and electronic equipment | |
CN110636225B (en) | Photographing method and electronic equipment | |
CN110209324B (en) | Display method and terminal equipment | |
CN109639981B (en) | Image shooting method and mobile terminal | |
CN109104573B (en) | Method for determining focusing point and terminal equipment | |
CN109167917B (en) | Image processing method and terminal equipment | |
CN110769162B (en) | Electronic equipment and focusing method | |
CN111182206B (en) | Image processing method and device | |
CN110661972B (en) | Image processing method, image processing apparatus, electronic device, and medium | |
CN108520727B (en) | Screen brightness adjusting method and mobile terminal |
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 |