CN113592734B - Image processing method and device and electronic equipment - Google Patents

Image processing method and device and electronic equipment Download PDF

Info

Publication number
CN113592734B
CN113592734B CN202110837718.6A CN202110837718A CN113592734B CN 113592734 B CN113592734 B CN 113592734B CN 202110837718 A CN202110837718 A CN 202110837718A CN 113592734 B CN113592734 B CN 113592734B
Authority
CN
China
Prior art keywords
vertical
image
diagram
display
display image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110837718.6A
Other languages
Chinese (zh)
Other versions
CN113592734A (en
Inventor
李泽昱
胡敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110837718.6A priority Critical patent/CN113592734B/en
Publication of CN113592734A publication Critical patent/CN113592734A/en
Application granted granted Critical
Publication of CN113592734B publication Critical patent/CN113592734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention discloses an image processing method, an image processing device and electronic equipment. One embodiment of the method comprises the following steps: acquiring an initial cross diagram acquired by using at least two transversely arranged cameras, wherein a vertical screen device is provided with a vertical screen and the at least two cameras; transforming the initial cross-map into a first target display image suitable for display in the vertical screen based on a current image display mode; and displaying a first target display image in the vertical screen. Therefore, the flexibility of displaying the image to the user by the vertical screen device can be improved.

Description

Image processing method and device and electronic equipment
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to an image processing method, an image processing device, and an electronic device.
Background
Currently, some vertical screen devices can provide various functions for assisting a user in learning, so as to assist the user in better completing learning tasks. For example, a user may take an image for completed task content using a vertical screen device and send the taken image to other users for review by the other users.
In the related art, a vertical screen apparatus captures an image using a single camera. Therefore, the vertical screen device can acquire images with narrower visual field range, and the user experience of displaying the images to the user by the vertical screen device can be poor.
Disclosure of Invention
This disclosure is provided in part to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides an image processing method, an image processing device and electronic equipment, which can improve the flexibility of displaying images to a user by vertical screen equipment.
In a first aspect, embodiments of the present disclosure provide an image processing method, the method including: acquiring an initial cross diagram acquired by using at least two transversely arranged cameras, wherein a vertical screen device is provided with a vertical screen and the at least two cameras; transforming the initial cross-map into a first target display image suitable for display in the vertical screen based on a current image display mode; and displaying a first target display image in the vertical screen.
In a second aspect, embodiments of the present disclosure provide an image processing apparatus including: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an initial cross-map acquired by using at least two transversely arranged cameras, and a vertical screen device is provided with a vertical screen and the at least two cameras; a conversion unit configured to convert the initial cross-map into a first target display image suitable for display on the vertical screen based on a current image display manner; and a display unit for displaying a first target display image in the vertical screen.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the image processing method as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image processing method according to the first aspect.
After the initial transverse diagram is acquired by using at least two transverse cameras, the acquired initial transverse diagram can be converted into a first target display image suitable for being displayed in the vertical screen in combination with a current image display mode, and the first target display image is displayed in the vertical screen. On the one hand, the flexibility of the vertical screen equipment for collecting images can be improved by using the at least two transverse cameras. On the other hand, by combining the current image display mode, the first target display image is displayed in the vertical screen, so that the flexibility of displaying the image to the user by the vertical screen equipment can be improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of some embodiments of an image processing method of the present disclosure;
FIG. 2 is a flow chart of yet other embodiments of the image processing method of the present disclosure;
FIG. 3A is a schematic diagram showing a first cross-sectional view in some embodiments of an image processing method of the present disclosure;
FIG. 3B is a schematic diagram showing a first vertical view in some embodiments of an image processing method of the present disclosure;
FIG. 4 is a flow diagram of an image processing method of the present disclosure in some embodiments clipping a first vertical view;
FIG. 5 is a schematic diagram of an image processing method of the present disclosure with a first vertical view cut out in some embodiments;
FIG. 6 is a schematic diagram of an image processing method of the present disclosure with a first vertical view cut out in yet other embodiments;
FIG. 7 is a schematic diagram of the structure of some embodiments of an image processing apparatus of the present disclosure;
FIG. 8 is an exemplary system architecture in which the image processing methods of the present disclosure may be applied in some embodiments;
Fig. 9 is a schematic diagram of a basic structure of an electronic device provided according to some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Referring to fig. 1, a flow of some embodiments of an image processing method according to the present disclosure is shown. As shown in fig. 1, the image processing method includes the steps of:
step 101, acquiring an initial cross-map acquired by using at least two transverse cameras.
In this embodiment, the vertical screen apparatus has at least two cameras that are vertical and horizontal. Wherein, the vertical screen may be a screen for vertically displaying contents. The at least two cameras arranged horizontally may be at least two cameras arranged horizontally.
The vertical or lateral direction may be a direction relative to a portion of the portrait screen device. As an example, if the vertical screen device is a learning desk lamp for a user to learn, the above-described vertical or lateral direction may be a direction relative to a lamp post of the learning desk lamp.
In this embodiment, the execution subject of the image processing method may acquire the initial cross-sectional view acquired by using the above-described at least two cameras.
The initial cross-map may be a cross-map taken with the at least two cameras described above. In some scenarios, the initial cross-plot may be a cross-plot taken for a book. Typically, an initial cross-plot with a wider field of view can be acquired with at least two cameras positioned in a landscape orientation.
Step 102, based on the current image display mode, the initial cross-map is converted into a first target display image suitable for being displayed in the vertical screen.
In this embodiment, the execution subject may transform the initial cross-map into the first target display image suitable for display in the vertical screen based on the current image display manner.
The image display method may be a method of displaying an image on the vertical screen. For example, the image display mode may be a landscape or portrait display mode.
The first target display image may be a cross-view or a vertical view suitable for display in the vertical screen described above.
Step 103, displaying a first target display image in the vertical screen.
In this embodiment, the execution body may display the first target display image in the vertical screen.
Thus, the initial transverse diagram acquired by at least two transverse cameras can be converted into a transverse diagram or a vertical diagram suitable for being displayed in the vertical screen and displayed.
In this embodiment, after the initial cross-image is acquired by using at least two cameras arranged horizontally, the acquired initial cross-image may be converted into a first target display image suitable for displaying on the vertical screen in combination with the current image display mode, and the first target display image may be displayed on the vertical screen. On the one hand, the flexibility of the vertical screen equipment for collecting images can be improved by using the at least two transverse cameras. On the other hand, by combining the current image display mode, the first target display image is displayed in the vertical screen, so that the flexibility of displaying the image to the user by the vertical screen equipment can be improved.
The scheme described in the embodiment can be applied to camera calling interfaces provided by systems of various versions. Therefore, the scheme described in the embodiment has higher compatibility.
In some embodiments, the image display mode indicates a landscape display image and/or a portrait display image.
By selecting different image display modes, the horizontal drawing or the vertical drawing can be displayed in the vertical screen.
If the current image display mode indicates a landscape display image, the obtained first target display image is still a landscape image with a wider field of view. At this time, the vertical screen device can display the target display image with a wider field of view.
If the current image display mode indicates a vertical display image, the obtained first target display image is a vertical image. At this time, in the case where the initial cross-plot is acquired, the portrait screen apparatus is still able to display the target display image in such a manner that the portrait plot is displayed.
In some embodiments, the execution subject may execute the image processing method according to the flow shown in fig. 2. Step 201 and step 204 are similar to step 101 and step 103 in the embodiment shown in fig. 1, and are not described herein.
Step 202, if the currently adopted image display mode indicates to display an image horizontally, scaling the initial horizontal drawing into a first horizontal drawing suitable for displaying on the vertical screen as a first target display image.
As an example, referring to fig. 3A, the above-described execution subject may zoom out the initial cross-plot 301 into a first cross-plot 302 suitable for display in the vertical screen 303 as the first target display image. Further, the execution subject may display the first target display image in the vertical screen 303.
Thus, by enlarging or reducing the initial cross-plot, a first cross-plot suitable for display in the above-described vertical screen is obtained, and the first cross-plot is displayed in the above-described vertical screen. At this time, the object display image with a wider visual field range can be displayed in the vertical screen by the vertical screen device.
In step 203, if the currently adopted image display mode indicates a portrait display image, the initial horizontal drawing is cut into a first portrait suitable for being displayed on the portrait screen, and the first portrait is used as a first target display image.
As an example, referring to fig. 3B, the above-described execution subject may crop the initial cross-plot 301 into a first vertical plot 304 suitable for display in the vertical screen 303 as a first target display image. Further, the execution subject may display the first target display image in the vertical screen 303.
Thus, by cropping the acquired initial cross-sectional view, a first vertical view suitable for display in the above vertical screen is obtained, and the first vertical view is displayed in the above vertical screen.
In some embodiments, the execution body may crop the initial cross-diagram into a first vertical diagram suitable for display in the vertical screen according to a flow shown in fig. 4, which includes the following steps.
Step 401, determining a vertical drawing clipping length and a vertical drawing clipping width based on the vertical drawing clipping condition.
The vertical drawing cutting condition is a condition set for cutting the above-described initial horizontal drawing into a vertical drawing. The vertical drawing clipping conditions include: the aspect ratio of the initial cross-sectional view is equal to the cut aspect ratio, and the width of the initial cross-sectional view is different from the cut length of the vertical view by a predetermined length.
The above-mentioned cut aspect ratio is the ratio of the vertical cut length to the vertical cut width. The predetermined length may be set according to actual requirements.
It will be appreciated that with the aid of the above described vertical view clipping conditions, the vertical view clipping length and vertical view clipping width can be determined on the basis of knowing the length and width of the above described initial horizontal view.
Step 402, determining a clipping start point.
The clipping start point is a start point of clipping the first vertical drawing from the above-described initial horizontal drawing.
Step 403, cutting the initial horizontal drawing into a first vertical drawing with length and width being the vertical drawing cutting length and vertical drawing cutting width respectively, with the cutting start point as a starting point.
In some cases, the execution body may select a point from a long side of the initial horizontal drawing as a clipping start point, and then clip the initial horizontal drawing into a first vertical drawing having a length and a width that are the vertical drawing clipping length and the vertical drawing clipping width, respectively, with the clipping start point as a starting point.
By setting the aspect ratio of the initial horizontal drawing to be equal to the clipping aspect ratio, the proportion of the clipped first vertical drawing to the image of the initial horizontal drawing can be consistent, so that the clipping first vertical drawing can not be stretched. Further, on the basis of the initial cross-plot being acquired, the first cross-plot, in which no image stretching has occurred, can still be displayed in the portrait of the portrait device. Thus, the effect of displaying the target display image by means of the vertical drawing can be improved.
In some embodiments, the predetermined length is 0.
It will be appreciated that a predetermined length of 0 means that the width of the initial cross-plot described above is equal to the cut length of the vertical plot.
As an example, referring to fig. 5, the initial cross-plot 501 has a length and width of L1 and W1, respectively, assuming a vertical plot cut length and vertical plot cut width of L2 and W2, respectively. If the aspect ratio of the initial cross-plot 501 is preset to be equal to the cropping aspect ratio (i.e., ) And the width of the initial cross-plot 501 is equal to the vertical-plot cut length (i.e., w1=l2), then the vertical-plot cut length l2=w1, the vertical-plot cut width +.>The execution body may determine a clipping start point 502 from the long side of the initial cross-diagram 501, and further clip the initial cross-diagram 501 into a first vertical diagram 503 having a length and a width L2 and W2, respectively, with the clipping start point 502 as a start point.
In some embodiments, the execution body may determine the clipping start point in the following manner.
First, the formula is usedAnd determining the coordinate value of the horizontal axis of the cutting start point. Wherein X represents a horizontal axis coordinate value of a cutting start point to be determined, p is a positive number greater than 0 and less than 1, L1 represents a length of the initial horizontal drawing, W2 represents a vertical drawing cutting width, and X0 represents a horizontal axis offset of the initial horizontal drawing.
The value of p can be set according to actual requirements. The horizontal axis offset is an image offset of the initial horizontal drawing on the horizontal axis.
Specifically, the execution body may determine the coordinate value of the horizontal axis of the clipping start point by substituting the values of the respective parameters into the formula.
In the second step, the vertical axis coordinate value of the clipping start point is determined by using the formula y=y0+q. Wherein Y represents the vertical axis coordinate value of the cutting start point to be determined, Y0 represents the vertical axis offset of the initial horizontal diagram, and Q represents the preset offset.
The preset offset may be set (e.g., set to 0) according to actual requirements. The vertical axis offset is an image offset of the initial horizontal drawing on the vertical axis.
Specifically, the execution body may determine the vertical axis coordinate value of the clipping start point by substituting the values of the respective parameters into the formula.
It will be appreciated that if the initial cross-plot does not have an image shift on the horizontal axis, the horizontal axis shift amount is 0. Similarly, if the initial horizontal drawing does not have an image shift on the vertical axis, the vertical axis shift amount is 0.
And thirdly, taking a point indicated by coordinates formed by the coordinate values of the horizontal axis and the coordinate values of the vertical axis as a cutting starting point.
As an example, if it is determined that the horizontal axis coordinate value and the vertical axis coordinate value are x and y, respectively, the point indicated by the coordinates (x, y) is a clipping start point.
Thus, the clipping start point is accurately determined by comprehensively considering the vertical clipping width, the length of the initial horizontal drawing, the image offset of the initial horizontal drawing, and the like. Thereby, the accuracy of cutting out the first vertical drawing from the above-described initial horizontal drawing is improved.
In some embodiments, the execution body may execute the instruction in the following manner, where p isAnd/or Q is 0.
Optionally, p isQ is 0. It can be derived from this that->Y=y0. At this time, a cut-out start point may be determined from the long side of the initial cross-plot, and a first vertical plot, in which no image stretching occurs, may be cut out from the center region of the initial cross-plot.
Optionally, p isThe above Q is 0, and the predetermined length is set to 0. It can be derived from this that->Y=y0, l2=w1 (i.e., the vertical drawing cut length L2 is equal to the width W1 of the above-described initial horizontal drawing). In this case, the first vertical drawing, which is cut out from the center area of the initial horizontal drawing and has the same length as the width of the initial horizontal drawing and does not undergo image stretching, can be realized. As an example, referring to fig. 6, a first vertical drawing 503 having a length W1 and no image stretching occurs is cut out from a central area of an initial horizontal drawing 501 with a cut-out start point 502 as a start point.
In some embodiments, the first target display image is a first portrait. After displaying the first target display image in the vertical screen, the execution body may further execute the following steps.
Specifically, in response to a received image capturing request instruction to capture a cross-plot, the first target display image is rotated into a second cross-plot, and the second cross-plot is captured.
In some scenes, in response to an image capturing operation by a user, the image capturing application may transmit an image capturing request to the execution subject described above.
In some scenarios, the above-described execution subject may rotate the first target display image by a predetermined angle (e.g., 90 degrees) in a predetermined direction (clockwise or counterclockwise) to rotate the first target display image into the second cross-plot.
If the first target display image displayed on the vertical screen is the first vertical image, the horizontal image is directly shot, and the shot image may be distorted.
Therefore, the first target display image is rotated to be the second transverse diagram, and then the second transverse diagram is shot, so that the shot image is ensured not to be distorted. Thus, when the first target display image displayed on the above-described vertical screen is the first vertical image, even if the image capturing request instructs to capture the horizontal image, an image which does not suffer from distortion can be captured.
In some embodiments, the above-described execution subject may further execute the following steps after the second cross-diagram is taken.
Specifically, the second horizontal drawing is rotated to a first vertical drawing, and the first vertical drawing is stored as a target photographed image.
In some cases, the above-described execution body may rotate the second transverse chart by a predetermined angle in a direction opposite to the predetermined direction to rotate the photographed second transverse chart into the first vertical chart.
It is not difficult to find that the photographed second horizontal drawing does not coincide with the first target display image (i.e., the first vertical drawing) displayed in the vertical screen. Therefore, the shot second transverse diagram is rotated to be the first vertical diagram, and then the first vertical diagram is stored as the target shot image, so that the target shot image can be ensured to be consistent with the first vertical diagram displayed to a user through the vertical screen.
In some embodiments, the first target display image is a first portrait. After displaying the first target display image in the vertical screen, the execution body may further execute the following steps.
In a first step, in response to a received video recording request indicating that a recorded video frame is a video of a horizontal drawing, a first target display image is rotated into a second horizontal drawing, and the second horizontal drawing is recorded.
In some scenarios, in response to a video recording operation by a user, the video recording application may send a video recording request to the executing body.
The foregoing may be referred to as a manner of rotating the first object display image into the second horizontal drawing, and will not be described herein.
If the first target display image displayed by the vertical screen is the first vertical image, the horizontal image is directly recorded, which may cause distortion of the recorded video frame. Therefore, the first target display image is rotated into the second transverse diagram, and then the second transverse diagram is recorded, so that the recorded image is ensured not to be distorted. Thus, when the first target display image displayed on the vertical screen is the first vertical image, even if the video recording request indicates that the recorded video frame is the video of the horizontal image, the video frame which is not distorted can be recorded.
And a second step of rotating the second horizontal drawing into a first vertical drawing and storing the first vertical drawing as a video frame in the video.
The foregoing may be referred to as a manner of rotating the second horizontal drawing to the first vertical drawing, and will not be described herein.
It is not difficult to find that the recorded second horizontal drawing does not coincide with the first target display image (i.e., the first vertical drawing) displayed in the vertical screen. Therefore, the recorded second transverse diagram is rotated into the first vertical diagram, and then the first vertical diagram is stored into the video as the video frame, so that the video frame contained in the video can be ensured to be consistent with the first vertical diagram displayed to a user through the vertical screen.
In some embodiments, the executing body may further execute the following steps after displaying the first target display image in the vertical screen.
In the first step, in response to a switching operation of the image display mode, the initial horizontal drawing is converted into a second target display image suitable for display on the vertical screen based on the switched image display mode.
In some scenarios, the toggle operation may be a triggering operation of a toggle control presented in the portrait screen described above.
Note that, the manner of converting the target display image into the second target display image is similar to the manner of converting the target display image into the first target display image, and will not be described here again.
And a second step of switching to display a second target display image in the vertical screen.
It can be seen that the user can flexibly switch the mode of displaying the target display image by the vertical screen device. Therefore, the flexibility of viewing the target display image by the user can be improved.
With further reference to fig. 7, as an implementation of the method shown in the foregoing figures, the present disclosure provides some embodiments of an image processing apparatus, where the apparatus embodiments correspond to the method embodiments shown in fig. 1, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 7, the image processing apparatus of the present embodiment includes: an acquisition unit 701, a conversion unit 702, and a display unit 703. The acquisition unit 701 is configured to: an initial cross-map acquired with at least two cameras positioned in a landscape orientation is acquired, wherein the vertical screen device has a vertical screen and the at least two cameras. The transformation unit 702 is configured to: the initial cross-map is transformed into a first target display image suitable for display in the portrait screen based on a current image display manner. The display unit 703 is configured to: and displaying a first target display image in the vertical screen.
In this embodiment, the specific processes of the acquiring unit 701, the transforming unit 702 and the display unit 703 of the image processing apparatus and the technical effects thereof may refer to the descriptions related to the steps 101, 102 and 103 in the corresponding embodiment of fig. 1, and are not repeated here.
In some embodiments, the image display mode indicates a landscape display image and/or a portrait display image.
In some embodiments, the transformation unit 702 is further to: and if the currently adopted image display mode indicates a vertical display image, cutting the initial horizontal drawing into a first vertical drawing suitable for being displayed in the vertical screen, and taking the first vertical drawing as a first target display image.
In some embodiments, the transformation unit 702 is further to: determining a vertical drawing cutting length and a vertical drawing cutting width based on vertical drawing cutting conditions, wherein the vertical drawing cutting conditions comprise: the aspect ratio of the initial horizontal diagram is equal to the cutting aspect ratio, and the width of the initial horizontal diagram is different from the cutting length of the vertical diagram by a preset length; determining a cutting starting point; and cutting the initial transverse diagram into a first vertical diagram with the length and the width being respectively the vertical diagram cutting length and the vertical diagram cutting width by taking the cutting starting point as the starting point.
In some embodiments, the predetermined length is 0.
In some embodiments, the transformation unit 702 is further to: using the formulaDetermining a horizontal axis coordinate value of a clipping start point, wherein X represents the horizontal axis coordinate value, p is a positive number greater than 0 and less than 1, L1 represents the length of the initial horizontal diagram, W2 represents the clipping width of the vertical diagram, and X0 represents the horizontal axis offset of the initial horizontal diagram; determining a vertical axis coordinate value of a clipping start point by using a formula y=y0+q, wherein Y represents the vertical axis coordinate value, Y0 represents the vertical axis offset of the initial horizontal chart, and Q represents a preset offset; and taking a point indicated by coordinates formed by the coordinate values of the horizontal axis and the vertical axis as a clipping starting point.
In some embodiments, p isAnd/or Q is 0.
In some embodiments, the first target display image is a first vertical drawing; the image processing apparatus may further include a photographing unit (not shown in the drawings), wherein the photographing unit is configured to: in response to the received image photographing request instruction photographing the cross-plot, the first object display image is rotated into a second cross-plot, and the second cross-plot is photographed.
In some embodiments, the image processing apparatus may further include a storage unit (not shown in the drawings), wherein the storage unit is configured to: the second horizontal drawing is rotated to a first vertical drawing, and the first vertical drawing is stored as a target photographed image.
In some embodiments, the first target display image is a first vertical drawing; the image processing apparatus may further include a recording unit (not shown in the drawings), wherein the recording unit is configured to: responding to the received video recording request to indicate that the recorded video frame is video of a transverse diagram, rotating the first target display image into a second transverse diagram, and recording the second transverse diagram; the second horizontal drawing is rotated to a first vertical drawing, and the first vertical drawing is stored as a video frame in the above video.
In some embodiments, the transformation unit 702 is further to: and if the currently adopted image display mode indicates to transversely display the image, scaling the initial transverse diagram into a first transverse diagram suitable for being displayed in the vertical screen as a first target display image.
In some embodiments, the image processing apparatus may further include a switching unit (not shown in the drawings), wherein the switching unit is configured to: in response to a switching operation of the image display mode, converting the initial cross-map into a second target display image suitable for display in the vertical screen based on the switched image display mode; and switching to display a second target display image in the vertical screen.
With further reference to fig. 8, fig. 8 illustrates an exemplary system architecture in which the image processing methods of some embodiments of the present disclosure may be applied.
As shown in fig. 8, the system architecture may include a portrait device 801, where the portrait device 801 has a portrait 802 and landscape cameras 803, 804.
Various applications (e.g., a learning-class application, a shopping-class application, a search-class application, etc.) may be installed on the vertical screen device 801.
In some scenarios, the portrait screen device 801 may be placed on a desktop where a user may learn. At this point, the cameras 803, 804 may acquire an initial cross-map for the tabletop.
In practical applications, the portrait screen device 801 may display images acquired by the cameras 803 and 804 in the portrait screen 802. In some scenarios, the portrait screen device 801 may acquire an initial cross-plot acquired with the cameras 803, 804 in landscape orientation, and then, based on the current image display manner, may transform the initial cross-plot into a first target display image suitable for display in the portrait screen 802, and further, display the first target display image in the portrait screen 802.
The vertical screen device 801 may be hardware or software. When the portrait screen device 801 is hardware, it may be various electronic devices with a portrait screen including, but not limited to, a learning desk lamp, a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the vertical screen device 801 is software, it may be installed in the above-described electronic device, may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, and is not particularly limited herein.
It should be noted that the image processing method provided by the embodiment of the present disclosure may be performed by the portrait screen device 801, and accordingly, the image processing apparatus may be provided in the portrait screen device 801.
It should be understood that the number of risers and cameras in fig. 8 is merely illustrative. There may be any number of vertical screens and cameras, as desired for implementation.
Referring now to fig. 9, a schematic diagram of an electronic device (e.g., the portrait screen device of fig. 8) suitable for use in implementing some embodiments of the present disclosure is shown. In some embodiments of the present disclosure, the vertical screen device may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure. The electronic device shown in fig. 9 is merely an example, and should not impose any limitation on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. Communication means 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 9 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 9 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium according to some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be included in the electronic device or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an initial cross diagram acquired by using at least two transversely arranged cameras, wherein the vertical screen equipment is provided with a vertical screen and the at least two cameras; transforming the initial cross-map into a first target display image suitable for display in the vertical screen based on a current image display mode; and displaying the first target display image in the vertical screen.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, a display unit may also be described as a unit of "displaying the first target display image in the portrait screen".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the disclosure is not limited to the specific combination of features described above, but encompasses other technical solutions formed by any combination of features described above or their equivalents without departing from the spirit of the disclosure. Such as those described above, are provided in the present disclosure in place of, but not limited to, features having similar functions.
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (14)

1. An image processing method applied to a vertical screen device, comprising:
acquiring an initial cross diagram acquired by using at least two transversely arranged cameras, wherein the vertical screen equipment is provided with a vertical screen and the at least two cameras;
transforming the initial cross-map into a first target display image suitable for display in the vertical screen based on a current image display mode;
displaying the first target display image in the vertical screen, wherein the first target display image is a first vertical image; and
and in response to the received image capturing request, instructing capturing of a horizontal drawing, rotating the first target display image into a second horizontal drawing, and capturing the second horizontal drawing.
2. The method of claim 1, wherein the image display mode indicates a landscape display image and/or a portrait display image.
3. The method of claim 1, wherein the transforming the initial cross-map into a first target display image suitable for display in the portrait screen based on a current image display manner comprises:
and if the currently adopted image display mode indicates a vertical display image, cutting the initial horizontal drawing into a first vertical drawing suitable for being displayed in the vertical screen, and taking the first vertical drawing as the first target display image.
4. A method according to claim 3, wherein said cropping the initial cross-plot into a first vertical plot suitable for display in the vertical screen comprises:
determining a vertical drawing cutting length and a vertical drawing cutting width based on vertical drawing cutting conditions, wherein the vertical drawing cutting conditions comprise: the aspect ratio of the initial cross-section is equal to the cut aspect ratio, and the width of the initial cross-section is different from the cut length of the vertical section by a preset length;
determining a cutting starting point;
and cutting the initial transverse diagram into a first vertical diagram with the length and the width of the first vertical diagram respectively being the cutting length and the cutting width of the vertical diagram by taking the cutting starting point as a starting point.
5. The method of claim 4, wherein the predetermined length is 0.
6. The method of claim 4, wherein the determining a clipping start point comprises:
using the formulaDetermining a horizontal axis coordinate value of the clipping start point, wherein X represents the horizontal axis coordinate value, p is a positive number larger than 0 and smaller than 1, L1 represents the length of the initial horizontal diagram, W2 represents the clipping width of the vertical diagram, and X0 represents the horizontal axis offset of the initial horizontal diagram;
determining a vertical axis coordinate value of the clipping starting point by using a formula y=y0+q, wherein Y represents the vertical axis coordinate value, Y0 represents a vertical axis offset of the initial horizontal chart, and Q represents a preset offset;
and taking a point indicated by coordinates formed by the horizontal axis coordinate values and the vertical axis coordinate values as the cutting starting point.
7. The method of claim 6, wherein p isAnd/or said Q is 0.
8. The method according to claim 1, wherein the method further comprises:
the second horizontal drawing is rotated to the first vertical drawing, and the first vertical drawing is stored as a target photographed image.
9. The method of claim 1, wherein the first target display image is a first vertical image; and
the method further comprises the steps of:
Responding to a received video recording request to indicate that a recorded video frame is a video of a transverse diagram, rotating the first target display image into a second transverse diagram, and recording the second transverse diagram;
and rotating the second transverse diagram into the first vertical diagram, and storing the first vertical diagram into the video as a video frame.
10. The method of claim 1, wherein the transforming the initial cross-map into a first target display image suitable for display in the portrait screen based on a current image display manner comprises:
and if the currently adopted image display mode indicates to transversely display an image, scaling the initial transverse diagram into a first transverse diagram suitable for being displayed in the vertical screen, and taking the first transverse diagram as the first target display image.
11. The method according to any one of claims 1-10, further comprising:
in response to a switching operation of the image display mode, converting the initial cross-map into a second target display image suitable for display in the vertical screen based on the switched image display mode;
and switching to display the second target display image in the vertical screen.
12. An image processing apparatus, characterized by being applied to a vertical screen device, comprising:
The device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an initial transverse diagram acquired by using at least two transverse cameras, and the vertical screen device is provided with a vertical screen and the at least two cameras;
a transformation unit for transforming the initial cross-map into a first target display image suitable for display in the vertical screen based on a current image display manner;
a display unit configured to display the first target display image in the portrait screen, where the first target display image is a first portrait; and
and a photographing unit for photographing a cross-picture in response to the received image photographing request instruction, rotating the first target display image into a second cross-picture, and photographing the second cross-picture.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-11.
14. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-11.
CN202110837718.6A 2021-07-23 2021-07-23 Image processing method and device and electronic equipment Active CN113592734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110837718.6A CN113592734B (en) 2021-07-23 2021-07-23 Image processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110837718.6A CN113592734B (en) 2021-07-23 2021-07-23 Image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113592734A CN113592734A (en) 2021-11-02
CN113592734B true CN113592734B (en) 2024-01-23

Family

ID=78249278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110837718.6A Active CN113592734B (en) 2021-07-23 2021-07-23 Image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113592734B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101553A (en) * 2016-07-27 2016-11-09 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN107040723A (en) * 2017-04-28 2017-08-11 努比亚技术有限公司 A kind of imaging method based on dual camera, mobile terminal and storage medium
CN108650542A (en) * 2018-05-09 2018-10-12 腾讯科技(深圳)有限公司 Generate vertical screen video flowing, the method for image procossing, electronic equipment and video system
CN109126131A (en) * 2018-07-09 2019-01-04 网易(杭州)网络有限公司 Game picture display methods, storage medium and terminal
CN110611787A (en) * 2019-06-10 2019-12-24 青岛海信电器股份有限公司 Display and image processing method
CN110839174A (en) * 2019-12-02 2020-02-25 广州酷狗计算机科技有限公司 Image processing method and device, computer equipment and storage medium
CN111586237A (en) * 2020-04-30 2020-08-25 维沃移动通信有限公司 Image display method and electronic equipment
CN111694533A (en) * 2020-06-12 2020-09-22 深圳新智联软件有限公司 Screen projection display method and device applied to horizontal and vertical screens, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101553A (en) * 2016-07-27 2016-11-09 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN107040723A (en) * 2017-04-28 2017-08-11 努比亚技术有限公司 A kind of imaging method based on dual camera, mobile terminal and storage medium
CN108650542A (en) * 2018-05-09 2018-10-12 腾讯科技(深圳)有限公司 Generate vertical screen video flowing, the method for image procossing, electronic equipment and video system
CN109126131A (en) * 2018-07-09 2019-01-04 网易(杭州)网络有限公司 Game picture display methods, storage medium and terminal
CN110611787A (en) * 2019-06-10 2019-12-24 青岛海信电器股份有限公司 Display and image processing method
CN110839174A (en) * 2019-12-02 2020-02-25 广州酷狗计算机科技有限公司 Image processing method and device, computer equipment and storage medium
CN111586237A (en) * 2020-04-30 2020-08-25 维沃移动通信有限公司 Image display method and electronic equipment
CN111694533A (en) * 2020-06-12 2020-09-22 深圳新智联软件有限公司 Screen projection display method and device applied to horizontal and vertical screens, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113592734A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN110728622B (en) Fisheye image processing method, device, electronic equipment and computer readable medium
CN111291244B (en) House source information display method, device, terminal and storage medium
CN111459364B (en) Icon updating method and device and electronic equipment
CN111277893B (en) Video processing method and device, readable medium and electronic equipment
CN112351222B (en) Image special effect processing method and device, electronic equipment and computer readable storage medium
US11871137B2 (en) Method and apparatus for converting picture into video, and device and storage medium
CN111538448B (en) Image display method and device, terminal and storage medium
CN113535105B (en) Media file processing method, device, equipment, readable storage medium and product
CN112351221B (en) Image special effect processing method, device, electronic equipment and computer readable storage medium
CN113592734B (en) Image processing method and device and electronic equipment
CN114125485B (en) Image processing method, device, equipment and medium
CN115170395A (en) Panoramic image stitching method, panoramic image stitching device, electronic equipment, panoramic image stitching medium and program product
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN114187169A (en) Method, device and equipment for generating video special effect package and storage medium
CN113066166A (en) Image processing method and device and electronic equipment
CN113766178A (en) Video control method, device, terminal and storage medium
CN112346682A (en) Image special effect processing method and device, electronic equipment and computer readable storage medium
EP4113446A1 (en) Sticker processing method and apparatus
CN112668474B (en) Plane generation method and device, storage medium and electronic equipment
CN113096194B (en) Method, device, terminal and non-transitory storage medium for determining time sequence
CN111738958B (en) Picture restoration method and device, electronic equipment and computer readable medium
US20230300385A1 (en) Image processing method and apparatus
CN114827482B (en) Image brightness adjusting method and device, electronic equipment and medium
CN116320651A (en) Image display method and device and electronic equipment
CN112258408A (en) Information display method and device and electronic equipment

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