CN112801758A - Customized image direction adjusting method and device, storage medium and terminal equipment - Google Patents

Customized image direction adjusting method and device, storage medium and terminal equipment Download PDF

Info

Publication number
CN112801758A
CN112801758A CN202110287115.3A CN202110287115A CN112801758A CN 112801758 A CN112801758 A CN 112801758A CN 202110287115 A CN202110287115 A CN 202110287115A CN 112801758 A CN112801758 A CN 112801758A
Authority
CN
China
Prior art keywords
coordinate
customized
screen
determining
screen coordinate
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.)
Withdrawn
Application number
CN202110287115.3A
Other languages
Chinese (zh)
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.)
Hongyuan (Beijing) Technology Co.,Ltd.
Original Assignee
Zhuhai Necessary Industrial 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 Zhuhai Necessary Industrial Technology Co ltd filed Critical Zhuhai Necessary Industrial Technology Co ltd
Priority to CN202110287115.3A priority Critical patent/CN112801758A/en
Publication of CN112801758A publication Critical patent/CN112801758A/en
Priority to CN202210027482.4A priority patent/CN114202392A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0621Item configuration or customization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers

Abstract

The embodiment of the invention discloses a method and a device for adjusting the direction of a customized image, a storage medium and terminal equipment. The method comprises the following steps: displaying a customized image in a customized area of a commodity customization interface in response to a commodity customization event being triggered; determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment; and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph. By the technical scheme provided by the embodiment of the invention, on the premise of ensuring that the model making cost can be reduced and the model making efficiency is improved, and simultaneously, model making personnel can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customized interface can keep consistent with the screen direction of the terminal equipment, so that the production accuracy of the customized image is effectively ensured.

Description

Customized image direction adjusting method and device, storage medium and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method and a device for adjusting the direction of a customized image, a storage medium and a terminal device.
Background
At present, the e-commerce platform mainly sells commodities with limited specifications, the user has less selectivity when purchasing the commodities, and a single commodity type cannot meet the ever-increasing personalized requirements of the user. Therefore, the commodity customization business is produced at the same time.
At present, personalized commodity customization is realized mainly by changing patterns of a customized area in a commodity customization model. However, when the commodity is customized, because the UV coordinates of the customized area are inconsistent with the screen coordinates of the terminal device, the customized image displayed on the commodity customization interface is inconsistent with the screen direction of the terminal device, which easily causes the production error of the customized image and affects the factory production.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adjusting the direction of a customized image, a storage medium and a terminal device, which can ensure that the direction of the customized image displayed on a commodity customization interface is consistent with the screen direction of the terminal device, thereby effectively ensuring the production correctness of the customized image.
In a first aspect, an embodiment of the present invention provides a method for adjusting a direction of a customized image, including:
displaying a customized image in a customized area of a commodity customization interface in response to a commodity customization event being triggered;
determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment;
and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph.
In a second aspect, an embodiment of the present invention further provides an apparatus for adjusting a direction of a customized image, including:
the customized image display module is used for responding to the triggering of the commodity customization event and displaying a customized image in a customized area of the commodity customization interface;
the rotation angle determining module is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment;
and the customized image rotating module is used for rotating the customized image based on the rotating angle and taking the rotated customized image as a customized effect graph.
In a third aspect, an embodiment of the present invention further provides a custom image direction adjusting apparatus applied in the C2M mode, where the custom image direction adjusting apparatus includes the custom image direction adjusting apparatus provided in the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes the direction adjustment apparatus for customizing an image provided in the embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for adjusting an orientation of a customized image according to an embodiment of the present invention.
In a sixth aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for adjusting the orientation of a customized image according to an embodiment of the present invention.
In a seventh aspect, an embodiment of the present invention provides a computer program product, which when running on a computer, causes the computer to execute the method for adjusting the direction of a customized image according to an embodiment of the present invention.
According to the direction adjustment scheme of the customized image, which is provided by the embodiment of the invention, the customized image is displayed on the commodity customization interface in response to the triggering of the commodity customization event; determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment; and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph. By the technical scheme provided by the embodiment of the invention, on the premise of ensuring that the model making cost can be reduced and the model making efficiency is improved, and simultaneously, model making personnel can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customized interface can keep consistent with the screen direction of the terminal equipment, so that the production accuracy of the customized image is effectively ensured.
Drawings
FIG. 1 is a schematic diagram of a customization model provided by an embodiment of the present invention;
FIG. 2 is a UV expanded view of a custom model provided by an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for adjusting the orientation of a customized image according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a display effect of a customized image in a customized area of a goods customization interface according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a customized image rotation effect provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating a display effect of a customized area in a goods customization interface after a customized image is rotated according to an embodiment of the present invention;
FIG. 7 is a flow chart of a method for adjusting the orientation of a custom image according to another embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an apparatus for adjusting the direction of a customized image according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device in another embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are 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". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In the related art, when a commodity is customized, a customized image uploaded to a commodity customization interface by a user through a terminal device keeps consistent with the trend of UV (texture coordinate) of a customization area, but in order to ensure that the default direction of the customized image uploaded by the user is consistent with the screen direction of the terminal device, an external rectangular frame of the customization area needs to be parallel to the UV coordinate axis as much as possible when a model is manufactured, otherwise the uploaded customized image is rotated, for example, a vertical customized image uploaded by the user is in the customization area, but the default UV direction of the model customization area is horizontal, the display effect after user mapping is horizontal, a production diagram of the customized image needs to be restored to be horizontal when a factory is generated, and otherwise, a production error can be caused. Moreover, in order to ensure that the frame of the customized area is parallel to the UV coordinate axis, the manufacturing cost of the model is greatly increased, and the manufacturing efficiency of the model is reduced.
In order to reduce the manufacturing cost of the model, improve the manufacturing efficiency of the model and ensure the maximum utilization rate of the UV mapping, a model manufacturer can not consider the direction of a customization area when developing the UV (texture coordinates) so that the customization area can be developed in any direction. For example, fig. 1 is a schematic diagram of a customized model provided by an embodiment of the present invention. If content customization is desired in a customized area (grid area) of a shoe such as that shown in fig. 1, the shoe modeler may deploy the customized area in any direction during UV deployment in order to present as much image information as possible. However, the arbitrary direction spread of the customized region easily causes production errors of the customized image. For example, fig. 2 is a UV expansion diagram of a customized model provided by an embodiment of the present invention, such as a customized area (grid portion) shown in fig. 2, which is developed vertically by a model maker when UV is expanded, but a correct direction of the UV expansion diagram of the customized area should be horizontal, in which case, when the model is customized, a customized image uploaded by a user is vertical, which may cause the customized image direction to rotate along with the UV direction of the customized area after the user uploads the customized image on the customized area, so that a display effect of a vertical customized image on the customized area is horizontal, thereby causing a production error of the customized image.
Fig. 3 is a flowchart of a method for adjusting the orientation of a customized image according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a case where the orientation of the customized image in a customized interface of a product is adjusted, for example, when the method is applied to a C2M mode, where a user performs a product customization phase during ordering a customized product, and adjusts the orientation of the customized image uploaded by the user, the method may be performed by an orientation adjusting apparatus for a customized image, and the apparatus may be composed of hardware and/or software, and may be generally integrated in a terminal device. The device is a device capable of rotating the customized image according to the rotation angle of the UV coordinates of the commodity customized area relative to the screen coordinate system of the terminal device of the scene under the commodity customized scene; therefore, the customized image with the adaptive direction can be obtained, and the customized image is transmitted to the production end after the user places an order for the customizable commodity, so that the customized image on the customizable commodity can be correctly produced when a manufacturer produces the customizable commodity.
In a specific embodiment, the device may be an APP or an applet of an e-commerce platform capable of implementing commodity customization and ordering, or may be another e-commerce platform client capable of implementing commodity customization and ordering.
Here, the terminal device may be any electronic product that can perform human-computer interaction with a user through a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or a handwriting device, for example, a PC, a mobile phone, a smart phone, a PDA, a wearable device, a palm PC PPC, a wearable device, a tablet computer, a smart television, and the like, and may have an e-commerce platform client installed thereon, which can implement commodity customization and ordering.
It will be understood by those skilled in the art that the terminal device described above is merely exemplary, and other existing or future terminal devices that may be used with the present invention are also included within the scope of the present invention and are hereby incorporated by reference. Here, the terminal device includes an electronic device capable of automatically performing numerical calculation and information processing according to instructions set or stored in advance, and hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
As shown in fig. 3, the method specifically includes the following steps:
in step 310, in response to the merchandise customization event being triggered, a customized image is displayed in a customization area of the merchandise customization interface.
The customized area is an area which can be changed by a user in the commodity customized model. The commodity customization interface can be used for customizing commodities by users, and commodity images which the users want to customize can be displayed on the commodity customization interface. In the embodiment of the invention, when the commodity customization event is triggered, the customized image is displayed in the customization area of the commodity customization interface, so that the control event of the direction adjustment of the customized image is carried out. Illustratively, when a commodity customization instruction input by a user is received, a characteristic commodity customization event is triggered; when the opening operation of the commodity customization interface is detected, the characteristic commodity customization event is triggered. It should be noted that, in the embodiment of the present invention, the triggering condition of the commodity customization event is not limited.
And responding to the triggering of the commodity customization event, acquiring the customized image, and displaying the customized image in a customization area of the commodity customization interface. The image read from the local photo library may be used as a customized image, an image shot by the terminal device in real time may be used as a customized image, and an image received from another terminal device or a server may be used as a customized image. In an embodiment of the invention, the merchandise customization interface includes a customization area for placing a corresponding customized image.
And step 320, determining the rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal equipment.
In the embodiment of the present invention, the UV coordinates corresponding to the customized region may or may not coincide with the screen coordinate system of the terminal device. When the UV coordinate corresponding to the customized area is inconsistent with the screen coordinate system of the terminal device, the customized image is rotated according to the UV coordinate of the customized area when the customized image is displayed in the customized area of the commodity customized interface, so that the production error of the customized image is easily caused. In order to avoid production errors of the customized image, the rotation angle of the UV coordinates of the customized area relative to the screen coordinate system of the terminal equipment is determined, so that the customized image can be conveniently rotated according to the rotation angle.
In the embodiment of the present invention, the rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal device may be understood as a rotation angle of the UV coordinate system corresponding to the customized area relative to the screen coordinate system. Specifically, a UV coordinate system of the customized area and a screen coordinate system of the terminal device are determined, and the rotation angle of the UV coordinate system of the customized area relative to the screen coordinate system of the terminal device is determined according to a unit vector in the U-axis direction in the UV coordinate system and a unit vector in the Y-axis direction in the screen coordinate system. Or, the rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal device is determined according to the unit vector of the UV coordinate system in the V-axis direction and the unit vector of the screen coordinate system in the X-axis direction. The method for determining the rotation angle of the UV coordinate of the customized area with respect to the screen coordinate system of the terminal device is not limited in the embodiments of the present invention.
And 330, rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph.
In the embodiment of the invention, the customized image of the customized area in the commodity customization interface is rotated based on the rotation angle, so that the customized image is consistent with the screen direction of the terminal equipment, and the rotated customized image is used as the customized effect picture. The rotation angle includes a rotation angle and a rotation direction. When the customized image is rotated based on the rotation angle, the customized image can be automatically controlled to rotate based on the rotation angle, namely, the customized image is controlled to rotate by the corresponding angle according to the rotation direction. The user may also be guided to manually rotate the custom image based on the angle of rotation.
Optionally, rotating the customized image based on the rotation angle includes: generating rotation prompt information according to the rotation angle; and controlling the customized image to rotate in response to the rotation operation of the user on the customized image based on the rotation prompt information. Specifically, the rotation prompt information may be generated based on the rotation angle, wherein the rotation prompt information may include a voice prompt information and a reference image prompt information of the rotation angle. For example, the voice prompt message may be: "please rotate the customized image 90 ° clockwise", the reference image prompt information of the rotation angle includes the image information corresponding to the rotation angle and the image information corresponding to the rotation reference line. And controlling the customized image to rotate in response to the rotation operation of the user on the customized image based on the rotation prompt information until the direction of the customized image is consistent with the screen direction of the terminal equipment.
For example, fig. 4 is a schematic diagram of a display effect of a customized image in a customized area of a goods customization interface according to an embodiment of the present invention. As shown in fig. 4, since the customized area is a vertical UV developed view in the goods customization interface (i.e. the rotation angle of the UV coordinate of the customized area relative to the screen coordinate of the terminal device is +90 °), when the user uploads the vertical customized image to the terminal device to display the customized image in the customized area of the goods customization interface, the customized image rotates along with the UV direction of the customized area, so that the display effect of a vertical customized image in the customized area is horizontal, and if the customized image is directly printed, the production error of the customized image may be caused. In the embodiment of the invention, the customized image is rotated based on the rotation angle, and the rotated customized image is used as the customized effect graph. For example, fig. 5 is a schematic diagram of a customized image rotation effect provided by an embodiment of the present invention, as shown in fig. 5, firstly, the customized image is in an initial direction, and secondly, the customized image is in a reference direction, that is, the customized image is rotated clockwise by 90 °, so that the initial direction of the customized image is aligned with the reference direction of the customized image, and thus the direction of the customized image is consistent with the direction of the terminal device. Fig. 6 is a schematic view illustrating a display effect of a customized area in a goods customization interface after a customized image is rotated according to an embodiment of the present invention.
According to the direction adjusting method for the customized image, which is provided by the embodiment of the invention, the customized image is displayed on the commodity customization interface in response to the triggering of the commodity customization event; determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment; and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph. By the technical scheme provided by the embodiment of the invention, on the premise of ensuring that the model making cost can be reduced and the model making efficiency is improved, and simultaneously, model making personnel can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customized interface can keep consistent with the screen direction of the terminal equipment, so that the production accuracy of the customized image is effectively ensured.
In some embodiments, determining the rotation angle of the UV coordinates of the customized area with respect to the screen coordinate system of the terminal device comprises: determining a first screen coordinate of a central point of the customization area and a second screen coordinate of a target point; the target point is a deviation point of the central point in the coordinate axis direction of the screen coordinate system, the first screen coordinate is a coordinate of the central point in the screen coordinate system, and the second screen coordinate is a coordinate of the target point in the screen coordinate system; and determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the first screen coordinate and the second screen coordinate.
For example, the screen coordinate system may be a coordinate system constructed by using a vertex of an upper left corner of a display screen of the terminal device as an origin, an X axis to the right horizontally as a positive direction, and a Y axis vertically downward as the positive direction. In a screen coordinate system, the center point of the customized region is determined, for example, a point selected by human eyes observation of a user can be used as the center point of the customized region, or a circumscribed rectangle of the customized region can be determined, and the center point of the circumscribed rectangle is used as the center point of the customized region. It should be noted that, in the embodiment of the present invention, a determination manner of the central point of the customized area is not limited. Then, the first screen coordinate of the center point of the customization area, that is, the coordinate of the center point of the customization area in the screen coordinate system, is further determined. And taking a deviation point of the central point of the customized area in the coordinate axis direction (the longitudinal axis direction or the transverse axis direction) as a target point, wherein the deviation amount of the target point relative to the central point can be a preset deviation amount. Then, second screen coordinates of the target point, i.e. coordinates of the target point in the screen coordinate system, are determined. Illustratively, the first screen coordinate of the center point C of the customization region is (x1, y1), and the point having the center point at the longitudinal axis with the preset offset L is taken as the target point P, and the second screen coordinate of the target point P is (x2, y2), where x2 is x1, and y2 is y1+ L. Optionally, determining the first screen coordinate of the central point of the customized area and the second screen coordinate of the target point includes: determining a first screen coordinate of a center point of the customization region; and determining a second screen coordinate of the target point according to the first screen coordinate and the screen resolution of the terminal equipment. Illustratively, the first screen coordinate of the center point C of the customized region is (x1, y1), the screen resolution of the terminal device is r, and if the target point P is a deviation point of the center point in the vertical axis direction, the second screen coordinate of the target point P is (x2, y2), where x2 is x1, y2 is y1+ r k, where k is a preset coefficient, and if k is 0.5%, the greater the value of k, the higher the accuracy of the determined UV coordinate of the customized region with respect to the rotation angle of the screen coordinate system of the terminal device is.
In the embodiment of the invention, after the first screen coordinate of the central point of the customized area and the second screen coordinate of the target point are determined, the rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal equipment is determined according to the first screen coordinate and the second screen coordinate. Optionally, determining a rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal device according to the first screen coordinate and the second screen coordinate includes: determining a first UV coordinate of the central point according to the first screen coordinate, and determining a second UV coordinate of the target point according to the second screen coordinate; determining a UV vector according to the first UV coordinate and the second UV coordinate; and determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the UV vector and the reference unit vector. Wherein determining a first UV coordinate of the center point according to the first screen coordinate and determining a second UV coordinate of the target point according to the second screen coordinate comprises: determining a first world coordinate of the central point according to the first screen coordinate, and determining a second world coordinate of the target point according to the second screen coordinate; the first world coordinate is the coordinate of the central point in a world coordinate system, and the second world coordinate is the coordinate of the target point in the world coordinate system; and determining a first UV coordinate of the central point according to the first world coordinate, and determining a second UV coordinate of the target point according to the second world coordinate.
Illustratively, the first world coordinate of the center point is determined according to the first screen coordinate of the center point and the second world coordinate of the target point is determined according to the second screen coordinate of the target point by an openGL algorithm. The first world coordinate is a three-dimensional coordinate of the central point in the three-dimensional world coordinate system, and the second world coordinate is a three-dimensional coordinate of the target point in the three-dimensional world coordinate system. For example, the first world coordinate of the center point C is (x3, y3, z3), and the second world coordinate of the target point P is (x4, y4, z 4). Then, a first UV coordinate Cu () of the center point is determined from first world coordinates (x3, y3, z3) of the center point C in the three-dimensional space, and a second UV coordinate Pu () of the target point P is determined from second world coordinates (x4, y4, z4) of the target point P in the three-dimensional space. The first UV coordinate is a coordinate of the central point under a UV coordinate system, and the second UV coordinate is a coordinate of the target point under the UV coordinate system. From the first UV coordinate Cu () and the second UV coordinate Pu (), a UV vector V0 is determined, wherein V0() -Pu () -Cu (). Illustratively, the rotation angle of the UV coordinates of the customized area with respect to the screen coordinate system of the terminal device is determined according to the UV vector V0 and the reference unit vector V1. Specifically, the rotation angle Φ is determined according to the formula V0 × V1| V0| V1| cos θ, where the rotation angle Φ is θ when the inner product of the UV vector V0 and the reference unit vector V1 is greater than 0, and the rotation angle Φ is 2 pi- θ when the inner product of the UV vector V0 and the reference unit vector V1 is less than 0.
Optionally, the coordinate axis direction includes a longitudinal axis direction and a transverse axis direction; when the target point is an offset point of the central point in the longitudinal axis direction of the screen coordinate system, the reference unit vector is (0, 1); when the target point is a deviation point of the central point in the horizontal axis direction of the screen coordinate system, the reference unit vector is (1, 0).
Fig. 7 is a flowchart of a method for adjusting the direction of a customized image according to another embodiment of the present invention, as shown in fig. 7, the method includes the following steps:
step 710, displaying a customized image in a customized area of the merchandise customization interface in response to the merchandise customization event being triggered.
Step 720, determining a first screen coordinate of a central point of the customized area and a second screen coordinate of the target point; the target point is a deviation point of a central point in the coordinate axis direction of the screen coordinate system, the first screen coordinate is a coordinate of the central point in the screen coordinate system, and the second screen coordinate is a coordinate of the target point in the screen coordinate system.
Step 730, determining a first world coordinate of the central point according to the first screen coordinate, and determining a second world coordinate of the target point according to the second screen coordinate; the first world coordinate is the coordinate of the central point in the world coordinate system, and the second world coordinate is the coordinate of the target point in the world coordinate system.
And 740, determining a first UV coordinate of the central point according to the first world coordinate, and determining a second UV coordinate of the target point according to the second world coordinate.
And step 750, determining a UV vector according to the first UV coordinate and the second UV coordinate.
And 760, determining the rotation angle of the UV coordinate of the customized area relative to the screen coordinate system of the terminal equipment according to the UV vector and the reference unit vector.
And step 770, rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect map.
The direction adjusting method for the customized image provided by the embodiment of the invention can ensure that the model making cost can be reduced, the model making efficiency is improved, and meanwhile, on the premise that a model making worker can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customization interface can keep consistent with the screen direction of the terminal equipment, thereby effectively ensuring the production correctness of the customized image.
Fig. 8 is a schematic structural diagram of an apparatus for adjusting a direction of a customized image according to another embodiment of the present invention. As shown in fig. 8, the apparatus includes: a custom image presentation module 810, a rotation angle determination module 820, and a custom image rotation module 830. Wherein the content of the first and second substances,
the customized image display module 810 is configured to display a customized image in a customized area of a goods customization interface in response to a goods customization event being triggered;
a rotation angle determining module 820, configured to determine a rotation angle of the UV coordinates of the customized area with respect to a screen coordinate system of the terminal device;
and a customized image rotation module 830, configured to rotate the customized image based on the rotation angle, and use the rotated customized image as a customized effect map.
The direction adjusting device for the customized image, provided by the embodiment of the invention, responds to the triggering of the commodity customization event, and displays the customized image on the commodity customization interface; determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment; and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph. By the technical scheme provided by the embodiment of the invention, on the premise of ensuring that the model making cost can be reduced and the model making efficiency is improved, and simultaneously, model making personnel can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customized interface can keep consistent with the screen direction of the terminal equipment, so that the production accuracy of the customized image is effectively ensured.
Optionally, the rotation angle determining module includes:
the screen coordinate determination unit is used for determining a first screen coordinate of a central point of the customized area and a second screen coordinate of the target point; the target point is a deviation point of the central point in the coordinate axis direction of the screen coordinate system, the first screen coordinate is a coordinate of the central point in the screen coordinate system, and the second screen coordinate is a coordinate of the target point in the screen coordinate system;
and the rotation angle determining unit is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the first screen coordinate and the second screen coordinate.
Optionally, the rotation angle determining unit includes:
the UV coordinate determination subunit is used for determining a first UV coordinate of the central point according to the first screen coordinate and determining a second UV coordinate of the target point according to the second screen coordinate;
the UV vector determining subunit is used for determining a UV vector according to the first UV coordinate and the second UV coordinate;
and the rotation angle determining subunit is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the UV vector and the reference unit vector.
Optionally, the UV coordinate determination subunit is configured to:
determining a first world coordinate of the central point according to the first screen coordinate, and determining a second world coordinate of the target point according to the second screen coordinate; the first world coordinate is the coordinate of the central point in a world coordinate system, and the second world coordinate is the coordinate of the target point in the world coordinate system;
and determining a first UV coordinate of the central point according to the first world coordinate, and determining a second UV coordinate of the target point according to the second world coordinate.
Optionally, the coordinate axis direction includes a longitudinal axis direction and a transverse axis direction;
when the target point is an offset point of the central point in the longitudinal axis direction of the screen coordinate system, the reference unit vector is (0, 1);
when the target point is a deviation point of the central point in the horizontal axis direction of the screen coordinate system, the reference unit vector is (1, 0).
Optionally, the screen coordinate determining unit is configured to:
determining a first screen coordinate of a center point of the customization region;
and determining a second screen coordinate of the target point according to the first screen coordinate and the screen resolution of the terminal equipment.
Optionally, the customized image rotation module is configured to:
generating rotation prompt information according to the rotation angle;
and controlling the customized image to rotate in response to the rotation operation of the user on the customized image based on the rotation prompt information.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For technical details which are not described in detail in the embodiments of the present invention, reference may be made to the methods provided in all the aforementioned embodiments of the present invention.
The embodiment of the invention also provides a custom image direction adjusting device applied to the C2M mode, and the custom image direction adjusting device comprises the custom image direction adjusting device provided by the embodiment of the invention.
The embodiment of the invention also provides terminal equipment, and the terminal equipment comprises the direction adjusting device for customizing the image provided by the embodiment of the invention.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method of orientation adjustment for a customized image, the method comprising:
displaying a customized image in a customized area of a commodity customization interface in response to a commodity customization event being triggered;
determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment;
and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the above-mentioned direction adjustment operation of the customized image, and may also perform related operations in the direction adjustment method of the customized image provided by any embodiments of the present invention.
The embodiment of the invention provides electronic equipment, wherein the direction adjusting device for customizing images provided by the embodiment of the invention can be integrated in the electronic equipment. Fig. 9 is a block diagram of an electronic device according to an embodiment of the present invention. The electronic device 900 may include: a memory 901, a processor 902 and a computer program stored on the memory 901 and executable on the processor, wherein the processor 902 executes the computer program to implement the method for adjusting the direction of the customized image according to the embodiment of the present invention.
The electronic equipment provided by the embodiment of the invention responds to the triggering of the commodity customization event, and displays the customized image on the commodity customization interface; determining a rotation angle of the UV coordinates of the customized area relative to a screen coordinate system of the electronic device; and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph. By the technical scheme provided by the embodiment of the invention, on the premise of ensuring that the model making cost can be reduced and the model making efficiency is improved, and simultaneously, model making personnel can determine the UV expansion diagram of the model according to the maximum texture utilization rate, the customized image displayed on the commodity customization interface can keep consistent with the screen direction of the electronic equipment, so that the production accuracy of the customized image is effectively ensured.
The direction adjusting device, the storage medium and the terminal device for the customized image provided in the above embodiments may execute the direction adjusting method for the customized image provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a method for adjusting the direction of a customized image according to any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (19)

1. A direction adjusting method of a customized image is applied to a terminal device and comprises the following steps:
displaying a customized image in a customized area of a commodity customization interface in response to a commodity customization event being triggered;
determining a rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment;
and rotating the customized image based on the rotation angle, and taking the rotated customized image as a customized effect graph.
2. The method of claim 1, wherein determining the rotation angle of the UV coordinates of the customized area relative to a screen coordinate system of the terminal device comprises:
determining a first screen coordinate of a central point of the customization area and a second screen coordinate of a target point; the target point is a deviation point of the central point in the coordinate axis direction of the screen coordinate system, the first screen coordinate is a coordinate of the central point in the screen coordinate system, and the second screen coordinate is a coordinate of the target point in the screen coordinate system;
and determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the first screen coordinate and the second screen coordinate.
3. The method of claim 2, wherein determining the rotation angle of the UV coordinates of the customized area relative to the screen coordinate system of the terminal device according to the first screen coordinates and the second screen coordinates comprises:
determining a first UV coordinate of the central point according to the first screen coordinate, and determining a second UV coordinate of the target point according to the second screen coordinate;
determining a UV vector according to the first UV coordinate and the second UV coordinate;
and determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the UV vector and the reference unit vector.
4. The method of claim 3, wherein determining a first UV coordinate of the center point from the first screen coordinate and a second UV coordinate of the target point from the second screen coordinate comprises:
determining a first world coordinate of the central point according to the first screen coordinate, and determining a second world coordinate of the target point according to the second screen coordinate; the first world coordinate is the coordinate of the central point in a world coordinate system, and the second world coordinate is the coordinate of the target point in the world coordinate system;
and determining a first UV coordinate of the central point according to the first world coordinate, and determining a second UV coordinate of the target point according to the second world coordinate.
5. The method of claim 3, wherein the coordinate axis directions include a longitudinal axis direction and a transverse axis direction;
when the target point is an offset point of the central point in the longitudinal axis direction of the screen coordinate system, the reference unit vector is (0, 1);
when the target point is a deviation point of the central point in the horizontal axis direction of the screen coordinate system, the reference unit vector is (1, 0).
6. The method of claim 2, wherein determining first screen coordinates of a center point of the custom region and second screen coordinates of a target point comprises:
determining a first screen coordinate of a center point of the customization region;
and determining a second screen coordinate of the target point according to the first screen coordinate and the screen resolution of the terminal equipment.
7. The method of claim 1, wherein rotating the custom image based on the angle of rotation comprises:
generating rotation prompt information according to the rotation angle;
and controlling the customized image to rotate in response to the rotation operation of the user on the customized image based on the rotation prompt information.
8. A direction adjusting device for customizing an image is applied to a terminal device, and comprises:
the customized image display module is used for responding to the triggering of the commodity customization event and displaying a customized image in a customized area of the commodity customization interface;
the rotation angle determining module is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment;
and the customized image rotating module is used for rotating the customized image based on the rotating angle and taking the rotated customized image as a customized effect graph.
9. The apparatus of claim 8, wherein the rotation angle determination module comprises:
the screen coordinate determination unit is used for determining a first screen coordinate of a central point of the customized area and a second screen coordinate of the target point; the target point is a deviation point of the central point in the coordinate axis direction of the screen coordinate system, the first screen coordinate is a coordinate of the central point in the screen coordinate system, and the second screen coordinate is a coordinate of the target point in the screen coordinate system;
and the rotation angle determining unit is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the first screen coordinate and the second screen coordinate.
10. The apparatus of claim 9, wherein the rotation angle determination unit comprises:
the UV coordinate determination subunit is used for determining a first UV coordinate of the central point according to the first screen coordinate and determining a second UV coordinate of the target point according to the second screen coordinate;
the UV coordinate determination subunit is used for determining a UV vector according to the first UV coordinate and the second UV coordinate;
and the rotation angle determining subunit is used for determining the rotation angle of the UV coordinate of the customized area relative to a screen coordinate system of the terminal equipment according to the UV vector and the reference unit vector.
11. The apparatus of claim 10, wherein the UV coordinate determination subunit is configured to:
determining a first world coordinate of the central point according to the first screen coordinate, and determining a second world coordinate of the target point according to the second screen coordinate; the first world coordinate is the coordinate of the central point in a world coordinate system, and the second world coordinate is the coordinate of the target point in the world coordinate system;
and determining a first UV coordinate of the central point according to the first world coordinate, and determining a second UV coordinate of the target point according to the second world coordinate.
12. The apparatus of claim 10, wherein the coordinate axis directions comprise a longitudinal axis direction and a transverse axis direction;
when the target point is an offset point of the central point in the longitudinal axis direction of the screen coordinate system, the reference unit vector is (0, 1);
when the target point is a deviation point of the central point in the horizontal axis direction of the screen coordinate system, the reference unit vector is (1, 0).
13. The apparatus of claim 9, wherein the screen coordinate determination unit is configured to:
determining a first screen coordinate of a center point of the customization region;
and determining a second screen coordinate of the target point according to the first screen coordinate and the screen resolution of the terminal equipment.
14. The apparatus of claim 8, wherein the custom image rotation module is configured to:
generating rotation prompt information according to the rotation angle;
and controlling the customized image to rotate in response to the rotation operation of the user on the customized image based on the rotation prompt information.
15. A custom image orientation adjustment device for use in C2M mode, the custom image orientation adjustment device comprising the apparatus of any of claims 8-14.
16. A terminal device, characterized in that it comprises the apparatus of any of claims 8-14.
17. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of orientation adjustment of a customized image according to any one of claims 1-7.
18. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of orientation adjustment of a customized image according to any of claims 1-7 when executing the computer program.
19. A computer program product, characterized in that it causes a computer to carry out the method of orientation adjustment of a customized image according to any one of claims 1-7, when said computer program product is run on the computer.
CN202110287115.3A 2021-03-17 2021-03-17 Customized image direction adjusting method and device, storage medium and terminal equipment Withdrawn CN112801758A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110287115.3A CN112801758A (en) 2021-03-17 2021-03-17 Customized image direction adjusting method and device, storage medium and terminal equipment
CN202210027482.4A CN114202392A (en) 2021-03-17 2022-01-11 Customized image direction adjusting method and device, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110287115.3A CN112801758A (en) 2021-03-17 2021-03-17 Customized image direction adjusting method and device, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN112801758A true CN112801758A (en) 2021-05-14

Family

ID=75817169

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110287115.3A Withdrawn CN112801758A (en) 2021-03-17 2021-03-17 Customized image direction adjusting method and device, storage medium and terminal equipment
CN202210027482.4A Pending CN114202392A (en) 2021-03-17 2022-01-11 Customized image direction adjusting method and device, storage medium and terminal equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210027482.4A Pending CN114202392A (en) 2021-03-17 2022-01-11 Customized image direction adjusting method and device, storage medium and terminal equipment

Country Status (1)

Country Link
CN (2) CN112801758A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281531A (en) * 2008-06-02 2008-10-08 孔繁佳 Method for performing network on-line interactive customization for image and pattern
CN105979242A (en) * 2015-11-23 2016-09-28 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN108734671A (en) * 2017-09-12 2018-11-02 武汉天际航信息科技股份有限公司 Three-D grain method of modifying and its system, automatic chart pasting method and its system
CN111768452A (en) * 2020-06-30 2020-10-13 天津大学 Non-contact automatic mapping method based on deep learning

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10719862B2 (en) * 2008-07-29 2020-07-21 Zazzle Inc. System and method for intake of manufacturing patterns and applying them to the automated production of interactive, customizable product
CN107016596A (en) * 2017-03-23 2017-08-04 深圳前海易创艺乐科技有限公司 A kind of commodity stamp method for customizing and its platform
CN107330958A (en) * 2017-06-01 2017-11-07 福州魅印数码科技有限公司 A kind of 3D displayings of customed product and production method for customizing, apparatus and system
CN111028038A (en) * 2019-05-22 2020-04-17 珠海随变科技有限公司 Commodity customization method, commodity customization device, commodity customization equipment and storage medium
CN111292162A (en) * 2020-01-21 2020-06-16 珠海随变科技有限公司 Commodity customization method, commodity customization device, terminal or server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281531A (en) * 2008-06-02 2008-10-08 孔繁佳 Method for performing network on-line interactive customization for image and pattern
CN105979242A (en) * 2015-11-23 2016-09-28 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN108734671A (en) * 2017-09-12 2018-11-02 武汉天际航信息科技股份有限公司 Three-D grain method of modifying and its system, automatic chart pasting method and its system
CN111768452A (en) * 2020-06-30 2020-10-13 天津大学 Non-contact automatic mapping method based on deep learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FROM_THE_STAR: "ThreeJS(WebGL)如何使用UV坐标贴图,实现UV旋转偏移", 《HTTPS://BLOG.CSDN.NET/FROM_THE_STAR/ARTICLE/DETAILS/106594769》 *

Also Published As

Publication number Publication date
CN114202392A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN108027650B (en) Method for measuring angle between displays and electronic device using the same
JP6286442B2 (en) Method, apparatus, facility, program and recording medium for controlling rotation of screen screen
US11231845B2 (en) Display adaptation method and apparatus for application, and storage medium
JP6048898B2 (en) Information display device, information display method, and information display program
CN111324250B (en) Three-dimensional image adjusting method, device and equipment and readable storage medium
JP6500355B2 (en) Display device, display program, and display method
GB2590212A (en) Augmented reality multi-plane model animation interaction method and device, apparatus, and storage medium
CN109644231A (en) The improved video stabilisation of mobile device
US11687350B2 (en) Electronic device for providing execution screen of application and method for operating the same
TW201435710A (en) Electronic device capable of correcting touch position, touch position correcting system and method
CN107704242A (en) The horizontal application method and electronic equipment of a kind of vertically displaying screen
CN111638929A (en) Startup image processing method, device, equipment and storage medium
US10872455B2 (en) Method and portable electronic device for changing graphics processing resolution according to scenario
KR102354016B1 (en) Method for changing the size of contents displayed on display and electronic device thereof
CN112181141A (en) AR positioning method, AR positioning device, electronic equipment and storage medium
CN112887777B (en) Interactive prompting method and device for interactive video, electronic equipment and storage medium
CN112801758A (en) Customized image direction adjusting method and device, storage medium and terminal equipment
CN105335118B (en) The display methods and device of a kind of electronic equipment control
CN110989880A (en) Interface element processing method and device and readable storage medium
CN110908508A (en) Control method of virtual picture, terminal device and storage medium
WO2015196825A1 (en) Virtual window rotating method, terminal and storage medium
CN111077999B (en) Information processing method, equipment and system
JP2015032261A (en) Display device and control method
CN107038746B (en) Information processing method and electronic equipment
WO2020133395A1 (en) Display method, storage medium, and electronic device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210630

Address after: 509, 5th floor, building 1, 8 xinjiekouwai street, Xicheng District, Beijing 100088

Applicant after: Hongyuan (Beijing) Technology Co.,Ltd.

Address before: 519085 Building 8, No.1, Tangjiawan Harbin Institute of technology, high tech Zone, Zhuhai City, Guangdong Province

Applicant before: Zhuhai necessary Industrial Technology Co.,Ltd.

WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210514