The content of the invention
In view of this, the present invention provides a kind of image processing method, device and electronic equipment, to improve electronic equipment outputThe flexibility of image.
To achieve the above object, the present invention provides following technical scheme:
A kind of image processing method, applied in electronic equipment, the electronic equipment includes image capture module, the figureAs acquisition module is provided with the image sensing cell for gathering image;Described image sensing unit is formed by pel array;
This method includes:
Receive the pixel ratio parameter of user's input;
The pel array is divided into the first sub-array of pixels and the second sub-array of pixels, wherein, first pixelThe pixel ratio of subarray is identical with the pixel ratio parameter that user inputs;
When the electronic equipment calls described image acquisition module, detect whether to receive the first operation of user;
When receiving the first operation of user, control described image sensing unit is gathered using first sub-array of pixelsFirst image;
Export described first image.
It is preferred that, the pel array of described image sensing unit is circle.
It is preferred that, after first predetermined registration operation for detecting user, in addition to:
Described image sensing unit is controlled using first sub-array of pixels and second sub-array of pixels collection theTwo images;
Export second image.
It is preferred that, after the second image of the output, in addition to:
Determine that user rotates the anglec of rotation and the direction of rotation of second image;
Rotated centered on the round dot of second image with the direction of rotation to the anglec of rotation.
It is preferred that, the first operation of the user includes the operation that user triggers the display unit of the electronic equipment;
Or, user presses the operation of the first button of the electronic equipment.
A kind of image processing apparatus, applied in electronic equipment, the electronic equipment includes image capture module, the figureAs acquisition module is provided with the image sensing cell for gathering image;Described image sensing unit is formed by pel array;
The device includes:
First receiving unit, the pixel ratio parameter for receiving user's input;
First division unit, for the pel array to be divided into the first sub-array of pixels and the second sub-array of pixels,Wherein, the pixel ratio of first sub-array of pixels is identical with the pixel ratio parameter that user inputs;
First detection unit, for when the electronic equipment calls described image acquisition module, detecting whether to receiveThe first operation of user;
First control unit, when being operated for receiving the first of user, control described image sensing unit is described inFirst sub-array of pixels gathers the first image;
First output unit, for exporting described first image.
It is preferred that, the pel array of described image sensing unit is circle.
It is preferred that, in addition to:
Second control unit, when being operated for receiving the first of user, control described image sensing unit is described inFirst sub-array of pixels and second sub-array of pixels gather the second image;
Second output unit, for exporting second image.
It is preferred that, in addition to:
First determining unit, for determining that user rotates the anglec of rotation and the direction of rotation of second image;
First rotary unit, for being rotated centered on the round dot of second image with the direction of rotation to the rotationGyration.
It is preferred that, the first operation of the user includes the operation that user triggers the display unit of the electronic equipment;
Or, user presses the operation of the first button of the electronic equipment.
A kind of electronic equipment, including the as above image processing apparatus described in any one.
Understand that compared with prior art, the embodiment of the invention discloses a kind of image procossing via above-mentioned technical schemeMethod, be can apply in electronic equipment, in the method, and the pixel ratio parameter according to the user's input received is passed to imageThe pel array of sense unit is divided so that pel array includes the first sub-array of pixels and the second sub-array of pixels, wherein,The pixel ratio of first sub-array of pixels is identical with the pixel ratio parameter that user inputs;When electronic equipment calls image capture module,When detecting the first operation of user, control image sensing cell gathers the first image using the first sub-array of pixels, and exportsFirst image;In the present invention, due to the difference of pixel ratio parameter that can be inputted according to user, to original pel arrayDivided, and image is gathered using the first sub-array of pixels corresponding with the pixel ratio parameter of user, this improves defeatedGo out the flexibility of image.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeSite preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based onEmbodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not madeEmbodiment, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of image processing method, device and electronic equipment, by according to the use receivedThe pixel ratio parameter of family input is divided to the pel array of image sensing cell so that pel array includes the first pixelArray and the second sub-array of pixels, wherein, the pixel ratio of the first sub-array of pixels is identical with the pixel ratio parameter that user inputs;WhenElectronic equipment calls image capture module, when detecting the first operation of user, and control image sensing cell utilizes the first pixelSubarray gathers the first image, and exports first image;In the present invention, due to the pixel ratio ginseng that can be inputted according to userSeveral differences, is divided to original pel array, and utilizes the first pixel submatrix corresponding with the pixel ratio parameter of userArrange to gather image, this improves the flexibility for exporting image of different shapes.
One embodiment of the invention discloses a kind of image processing method, this method can apply to mobile phone, palm PC,In the electronic equipments such as tablet personal computer;
The electronic equipment has image capture module, and user can be realized to figure by the image capture module of electronic equipmentThe collection of picture, such as image capture module can be camera.
Wherein, image capture module is provided with image sensing cell, when electronic equipment calls image capture module collection figureDuring picture, actually the collection to image is realized using the image sensing cell in image capture module.
The pel array that image sensing cell is made up of a large amount of pixels is formed, wherein, image sensing cell is to utilize picturePixel array gathers image.
Referring to Fig. 1, this method may comprise steps of:
Step 101:Receive the pixel ratio parameter of user's input;
Wherein, user can set pixel ratio parameter on an electronic device according to the actual requirements;
Specifically, can be provided with the pixel input frame for inputting pixel ratio parameter on electronic equipment, user can beInput pixel ratio parameter in the pixel input frame;
Wherein, the pixel ratio parameter is generally aspect ratio parameter, but the present invention is defined not to this, orDepth-width ratio parameter.
Step 102:Pel array is divided into the first sub-array of pixels and the second sub-array of pixels;
, can be according to picture of the pixel ratio parameter to image sensing cell after the pixel ratio parameter of user's input is receivedPixel array is divided, wherein, the pixel ratio of the first sub-array of pixels marked off is identical with the pixel ratio parameter that user inputs;And the second sub-array of pixels is removes the residual pixel array of the first sub-array of pixels in the pel array of image sensing cell.That is, the pel array of image sensing cell is made up of the first sub-array of pixels and the second sub-array of pixels.
For example, when the pixel ratio that user inputs is 16:When 9, the pixel ratio of the first sub-array of pixels is then 16:9;And work as and useThe pixel ratio of family input is 4:When 3, the pixel ratio of the first sub-array of pixels is then 4:3;When the pixel ratio that user inputs is 1:1When, the pixel ratio of the first sub-array of pixels is then 1:1.
It should be noted that due to the limit of pixel wide and pixels tall in itself in the pel array of image sensing cellSystem, some special pixel ratio parameters can may not be divided in the pel array of image sensing cell.Therefore, in step 101In, the pixel ratio parameter that can be realized can be provided on electronic equipment so that user selects;Or in a step 102, when can notWhen marking off the first sub-array of pixels corresponding with the pixel ratio parameter that user inputs, prompting data can be exported, to remind useThe family pixel ratio parameter is undesirable, so that user re-enters;It can not certainly divide the picture with user's inputDuring plain the first sub-array of pixels more corresponding than parameter, the pixel ratio parameter that can be realized is provided so that user selects by electronic equipmentSelect.
Step 103:When electronic equipment calls image capture module, detect whether to receive the first operation of user;
Wherein, electronic equipment calls the mode of image capture module to have a variety of, and the present invention is not defined to this;Specifically, call image capture module when the icon or button of image capture module can be directly triggered in user such as electronic equipment;Or electronic equipment is detecting calling figure picture when user triggers the icon of image capture module indirectly by some application programsAcquisition module, for example, user passes through the application triggers image capture module such as QQ, wechat.
The first operation of user gathers the foundation of the first image for triggering electronic equipment using image capture module, when not connecingWhen receiving the first operation of user, then subsequent action is not performed.
Step 104:When receiving the first operation of user, control image sensing cell is gathered using the first sub-array of pixelsFirst image;
Wherein, the first image is gathered using the first sub-array of pixels by controlling image sensing cell so that most end formInto the first image shape it is corresponding with the first sub-array of pixels.
Step 105:Export the first image.
Because the pixel ratio of the first sub-array of pixels is identical with the pixel ratio parameter that user inputs, then, final outputFirst image is then image corresponding with the pixel ratio parameter of user's input.
In embodiments of the present invention, due to the difference of pixel ratio parameter that can be inputted according to user, to original pixelArray is divided, and gathers image using the first sub-array of pixels corresponding with the pixel ratio parameter of user so that finalCan export with the desired shape identical image of user, this improves the flexibility for exporting image of different shapes.
In the present invention, the shape of the pel array of image sensing cell can be any shape, such as rectangle, prosShape, circle etc., the present invention are not defined to this.
And in the prior art, the pel array of image sensing cell is rectangle, when user is clapped using electronic equipmentWhen taking the photograph image, for the ease of viewing, the ordinary session hopes that captured scenery, personage, animal etc. can be in the visual angle of userOn present image.When such as shooting personage, generally, user is intended to the presentation mode of captured personage in the picture such asShown in Fig. 2;But it is due to that the angles of user's hand-hold electronic equipments is easy to run-off the straight, so being easily caused captured personagePresentation mode in the picture is as shown in Figure 3.In this case, user typically can be by way of rotating electronic device bodyTo cause the presentation mode of personage in image to can adapt to the visual angle of oneself, as shown in Figure 4;But it is due to the image of electronic equipmentFor rectangle, image will be so caused to have had a strong impact on the visual effect of user parallel to horizontal plane in itself.
Based on above mentioned problem, another embodiment of the present invention also discloses a kind of image processing method, as shown in figure 5, the partyMethod may comprise steps of:
Step 201:Receive the pixel ratio parameter of user's input;
Step 202:Pel array is divided into the first sub-array of pixels and the second sub-array of pixels;
Step 203:When electronic equipment calls image capture module, detect whether to receive the first operation of user;
Step 204:Receive the first operation of user;
Step 205:Image sensing cell is controlled to gather the first image using the first sub-array of pixels;
Step 206:Export the first image;
Wherein, the shape of the first image is corresponding with the pixel ratio parameter that user inputs.
Step 207:Image sensing cell is controlled to gather the second figure using the first sub-array of pixels and the second sub-array of pixelsPicture;
Wherein, the first sub-array of pixels and the second sub-array of pixels constitute the pel array of image sensing cell, in this realityApply in example, the pel array of image sensing cell is circle.So, the first sub-array of pixels and the second sub-array of pixels institute are utilizedThe shape for gathering the second image is also circle.
Step 208:Export the second image.
Wherein, the second image of electronic equipment output is shaped as circle, then, even if the personage presented in image is not inconsistentThe visual angle at family is shared, as shown in fig. 6, user can also check the image perpendicular to horizontal plane by rotating electronic device bodyIn personage, as shown in Figure 7.And circle is shaped as due to the image, because, rotating electronic device anyway, also notThe visual effect of user can be influenceed.
In embodiments of the present invention, due to the difference of pixel ratio parameter that can be inputted according to user, to original pixelArray is divided, and gathers image using the first sub-array of pixels corresponding with the pixel ratio parameter of user so that finalCan export with the desired shape identical image of user, this improves the flexibility for exporting image of different shapes;
Further, because the second image of output is shaped as circle corresponding with the pel array of image sensing cellShape, therefore, even if the second image of electronic equipment output is not presented with the visual angle of user, user is also without re-shootingImage, only needs rotating electronic device, and do not interfere with the visual effect of user.
Further embodiment of this invention also discloses a kind of image processing method, as shown in figure 8, this method can include it is followingStep:
Step 301:Receive the pixel ratio parameter of user's input;
Step 302:Pel array is divided into the first sub-array of pixels and the second sub-array of pixels;
Step 303:When electronic equipment calls image capture module, detect whether to receive the first operation of user;
Step 304:Receive the first operation of user;
Step 305:Image sensing cell is controlled to gather the first image using the first sub-array of pixels;
Step 306:Export the first image;
Wherein, the shape of the first image is corresponding with the pixel ratio parameter that user inputs.
Step 307:Image sensing cell is controlled to gather the second figure using the first sub-array of pixels and the second sub-array of pixelsPicture;
Wherein, the first sub-array of pixels and the second sub-array of pixels constitute the pel array of image sensing cell, in this realityApply in example, the pel array of image sensing cell is circle.So, the first sub-array of pixels and the second sub-array of pixels institute are utilizedThe shape for gathering the second image is also circle.
Step 308:Export the second image;
Step 309:Determine that user rotates the anglec of rotation and the direction of rotation of second image;
When the second image that electronic equipment is exported is not presented with the visual angle of user, in order to avoid user checks every timeSecond image is required to rotating electronic device, therefore, and user can rotate on electronic equipment body to the second image,Display unit as finger touches electronic equipment revolves to rotate the second image, or by the button of manual control electronicsTurn second image etc., electronic equipment can determine that user rotates the anglec of rotation and the direction of rotation of the second image.
Step 310:Rotated centered on the round dot of the second image with direction of rotation to the anglec of rotation.
Circle is shaped as due to the second image, be therefore, it can centered on the round dot of second graph with identified rotationTurn direction to rotate to the identified anglec of rotation so that the presentation mode of the second image meets the visual angle of user, improves and checksThe convenience of second image.
In embodiments of the present invention, the first operation of user utilizes image capture module collection first for triggering electronic equipmentThe foundation of image, the present invention is not defined to the first operation of user, for example, first operation can include user's triggeringThe operation of the display unit of the electronic equipment, or, user press the operation of the first button of the electronic equipment.
One embodiment of the invention also discloses a kind of image processing apparatus, and the device can apply in electronic equipment,The electronic equipment has image capture module, and user can be realized by the image capture module of electronic equipment and image is adoptedCollection, such as image capture module can be camera.
Wherein, image capture module is provided with image sensing cell, when electronic equipment calls image capture module collection figureDuring picture, actually the collection to image is realized using the image sensing cell in image capture module.
The pel array that image sensing cell is made up of a large amount of pixels is formed, wherein, image sensing cell is to utilize picturePixel array gathers image.
As shown in figure 9, the device can include the first receiving unit 401, the first division unit 402, the first detection unit403rd, the first control unit 404 and the first output unit 405, wherein:
First receiving unit 401, can be used for the pixel ratio parameter for receiving user's input;
First division unit 402, can be used for pel array being divided into the first sub-array of pixels and the second pixel submatrixRow;
Wherein, the pixel ratio of the first sub-array of pixels is identical with the pixel ratio parameter that user inputs;And the second pixel submatrixThe residual pixel array of the first sub-array of pixels is removed in the pel array for being classified as image sensing cell;That is image sensing cellPel array is made up of the first sub-array of pixels and the second sub-array of pixels.
First detection unit 403, can be used for, when electronic equipment calls image capture module, detecting whether to receive useFirst operation at family;
First control unit 404, when can be used for receiving the first operation of user, control image sensing cell utilizes theOne sub-array of pixels gathers the first image;
First output unit 405, can be used for exporting the first image.
In embodiments of the present invention, due to the difference of pixel ratio parameter that can be inputted according to user, to original pixelArray is divided, and gathers image using the first sub-array of pixels corresponding with the pixel ratio parameter of user so that finalCan export with the desired shape identical image of user, this improves the flexibility for exporting image of different shapes.
In the present invention, the shape of the pel array of image sensing cell can be any shape, such as rectangle, prosShape, circle etc., the present invention are not defined to this.
Another embodiment of the present invention also discloses a kind of image processing apparatus, as shown in Figure 10, and the device can include:TheOne receiving unit 501, the first division unit 502, the first detection unit 503, the first control unit 504, the first output unit505th, the second control unit 506 and the second output unit 507;Wherein:
First receiving unit 501, can be used for the pixel ratio parameter for receiving user's input;
First division unit 502, can be used for pel array being divided into the first sub-array of pixels and the second pixel submatrixRow;
Wherein, the pixel ratio of the first sub-array of pixels is identical with the pixel ratio parameter that user inputs;And the second pixel submatrixThe residual pixel array of the first sub-array of pixels is removed in the pel array for being classified as image sensing cell;That is image sensing cellPel array is made up of the first sub-array of pixels and the second sub-array of pixels.
First detection unit 503, can be used for, when electronic equipment calls image capture module, detecting whether to receive useFirst operation at family;
First control unit 504, when can be used for receiving the first operation of user, control image sensing cell utilizes theOne sub-array of pixels gathers the first image;
First output unit 505, can be used for exporting the first image;
Second control unit 506, can be when receiving the first operation of user, and control image sensing cell utilizes firstSub-array of pixels and the second sub-array of pixels gather the second image;
Wherein, the first sub-array of pixels and the second sub-array of pixels constitute the pel array of image sensing cell, in this realityApply in example, the pel array of image sensing cell is circle.So, the first sub-array of pixels and the second sub-array of pixels institute are utilizedThe shape for gathering the second image is also circle.
Second output unit 507, can export the second image.
In embodiments of the present invention, due to the difference of pixel ratio parameter that can be inputted according to user, to original pixelArray is divided, and gathers image using the first sub-array of pixels corresponding with the pixel ratio parameter of user so that finalCan export with the desired shape identical image of user, this improves the flexibility for exporting image of different shapes;
Further, because the second image of output is shaped as circle corresponding with the pel array of image sensing cellShape, therefore, even if the second image of electronic equipment output is not presented with the visual angle of user, user is also without re-shootingImage, only needs rotating electronic device, and do not interfere with the visual effect of user.
Further embodiment of this invention also discloses a kind of image processing apparatus, as shown in figure 11, and the device can include:TheOne receiving unit 601, the first division unit 602, the first detection unit 603, the first control unit 604, the first output unit605th, the second control unit 606, the second output unit 607, the first determining unit 608 and the first rotary unit 609;Wherein:
First receiving unit 601, can be used for the pixel ratio parameter for receiving user's input;
First division unit 602, can be used for pel array being divided into the first sub-array of pixels and the second pixel submatrixRow;
Wherein, the pixel ratio of the first sub-array of pixels is identical with the pixel ratio parameter that user inputs;And the second pixel submatrixThe residual pixel array of the first sub-array of pixels is removed in the pel array for being classified as image sensing cell;That is image sensing cellPel array is made up of the first sub-array of pixels and the second sub-array of pixels.
First detection unit 603, can be used for, when electronic equipment calls image capture module, detecting whether to receive useFirst operation at family;
First control unit 604, when can be used for receiving the first operation of user, control image sensing cell utilizes theOne sub-array of pixels gathers the first image;
First output unit 605, can be used for exporting the first image;
Second control unit 606, can be when receiving the first operation of user, and control image sensing cell utilizes firstSub-array of pixels and the second sub-array of pixels gather the second image;
Wherein, the first sub-array of pixels and the second sub-array of pixels constitute the pel array of image sensing cell, in this realityApply in example, the pel array of image sensing cell is circle.So, the first sub-array of pixels and the second sub-array of pixels institute are utilizedThe shape for gathering the second image is also circle.
Second output unit 607, can export the second image.
First determining unit 608, is determined for the anglec of rotation and direction of rotation that user rotates second image;
First rotary unit 609, can be used for rotating to the rotation with direction of rotation centered on the round dot of the second imageGyration.
Circle is shaped as due to the second image, be therefore, it can centered on the round dot of second graph with identified rotationTurn direction to rotate to the identified anglec of rotation so that the presentation mode of the second image meets the visual angle of user, improves and checksThe convenience of second image.
In embodiments of the present invention, the first operation of user utilizes image capture module collection first for triggering electronic equipmentThe foundation of image, the present invention is not defined to the first operation of user, for example, first operation can include user's triggeringThe operation of the display unit of the electronic equipment, or, user press the operation of the first button of the electronic equipment.
The embodiment of the present invention additionally provides a kind of electronic equipment, including as appoint it is upper it is any described by image processing apparatus.
The embodiment of each device is corresponding with embodiment of the method above, for details, reference can be made to embodiment of the method, no longer detailed hereinRepeat.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and otherBetween the difference of embodiment, each embodiment identical similar portion mutually referring to.For device disclosed in embodimentFor, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method partIt is bright.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined hereinGeneral Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the inventionThe embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase oneThe most wide scope caused.