[go: up one dir, main page]

CN109299484A - Image display method and device - Google Patents

Image display method and device Download PDF

Info

Publication number
CN109299484A
CN109299484A CN201710605910.6A CN201710605910A CN109299484A CN 109299484 A CN109299484 A CN 109299484A CN 201710605910 A CN201710605910 A CN 201710605910A CN 109299484 A CN109299484 A CN 109299484A
Authority
CN
China
Prior art keywords
image
target object
display
size
actual size
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
CN201710605910.6A
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.)
Samsung Tianjin Mobile Development Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Tianjin Mobile Development Center
Samsung Electronics 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 Samsung Tianjin Mobile Development Center, Samsung Electronics Co Ltd filed Critical Samsung Tianjin Mobile Development Center
Priority to CN201710605910.6A priority Critical patent/CN109299484A/en
Publication of CN109299484A publication Critical patent/CN109299484A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)

Abstract

A kind of image display method and equipment are provided, described image display methods includes: the image for showing object of reference, and extracts the display parameters of the object of reference;Obtain the image of target object;The imaging size of the target object is determined based on the display parameters of the object of reference;The image of the target object is shown according to the imaging size of the target object on the image of the object of reference.Using the described image display methods and equipment of exemplary embodiment of the present, the intelligent collocation of different dummy objects in the same space can be realized, and arranging effect figure of the dummy object in reality is presented to user.

Description

图像显示方法和设备Image display method and device

技术领域technical field

本发明总体说来涉及电子终端领域,更具体地讲,涉及一种图像显示方法和设备。The present invention generally relates to the field of electronic terminals, and more particularly, to an image display method and device.

背景技术Background technique

目前,电子终端已经成为日常出行必不可少的随身物品,用户希望电子终端能够最大化的为现实生活带来便捷。同样的,网购也是大家熟知且越来越受欢迎的一种购物方式,但问题是好多网上看好的物品买回来大小或样式不满意,这也是广大网购族的一大困扰。究其原因便是网购的物品不能与实物进行较好地匹配,只能靠人为估计往往误差较大。At present, electronic terminals have become indispensable personal items for daily travel, and users hope that electronic terminals can bring convenience to real life to the greatest extent. Similarly, online shopping is also a well-known and increasingly popular shopping method, but the problem is that many items that are optimistic about online are not satisfied with the size or style, which is also a major problem for the majority of online shoppers. The reason is that the items purchased online cannot be well matched with the physical objects, and can only rely on human estimation, which often has large errors.

此外,在进行装修时,各种家具的购买既要考虑尺寸也要考虑风格搭配,当在家具城发现喜欢的家具时,既会担心家具的尺寸是否合适,还会考虑摆放到家里是否与整体装修风格或其他家具风格相匹配,这类大件物品较难进行实际的搭配。In addition, when decorating, the purchase of various furniture should consider both the size and the style. When you find your favorite furniture in the furniture city, you will not only worry about whether the size of the furniture is appropriate, but also consider whether it will be placed in your home. Matching the overall decoration style or other furniture styles, such large items are more difficult to match.

发明内容SUMMARY OF THE INVENTION

本发明的示例性实施例的目的在于提供一种图像显示方法和设备,以解决现有技术中无法提供虚拟目标对象在现实环境中的搭配效果的技术问题。The purpose of the exemplary embodiments of the present invention is to provide an image display method and device, so as to solve the technical problem in the prior art that the matching effect of a virtual target object in a real environment cannot be provided.

根据本发明示例性实施例的一方面,提供一种图像显示方法,所述图像显示方法包括:显示参照物的图像,并提取所述参照物的显示参数;获取目标对象的图像;基于所述参照物的显示参数确定所述目标对象的成像尺寸;在所述参照物的图像上按照所述目标对象的成像尺寸显示所述目标对象的图像。According to an aspect of an exemplary embodiment of the present invention, there is provided an image display method, the image display method comprising: displaying an image of a reference object, and extracting display parameters of the reference object; acquiring an image of a target object; The display parameter of the reference object determines the imaging size of the target object; the image of the target object is displayed on the image of the reference object according to the imaging size of the target object.

可选地,所述参照物的显示参数可包括所述参照物的显示比例系数,所述显示比例系数可表示所述参照物的实际尺寸与所述参照物的成像尺寸的比值。Optionally, the display parameter of the reference object may include a display scale coefficient of the reference object, and the display scale coefficient may represent a ratio of the actual size of the reference object to the imaged size of the reference object.

可选地,基于所述参照物的显示比例系数确定所述目标对象的成像尺寸的步骤可包括:确定所述目标对象的实际尺寸;根据所述参照物的显示比例系数和所述目标对象的实际尺寸确定所述目标对象的成像尺寸。Optionally, the step of determining the imaging size of the target object based on the display scale factor of the reference object may include: determining the actual size of the target object; The actual size determines the imaging size of the target object.

可选地,所述目标对象的成像尺寸可为所述目标对象的实际尺寸与所述参照物的显示比例系数的商。Optionally, the imaging size of the target object may be the quotient of the actual size of the target object and the display scale coefficient of the reference object.

可选地,确定所述目标对象的实际尺寸的步骤可包括:通过拍摄所述目标对象的图像,基于所述目标对象的拍摄参数来获得所述目标对象的实际尺寸;或者根据用户输入来获得所述目标对象的实际尺寸。Optionally, the step of determining the actual size of the target object may include: obtaining the actual size of the target object based on shooting parameters of the target object by taking an image of the target object; or obtaining according to user input The actual size of the target object.

可选地,通过拍摄所述目标对象的图像,基于所述目标对象的拍摄参数来获得所述目标对象的实际尺寸的步骤可包括:显示拍摄的所述目标对象的图像;响应于用户的操作,在屏幕显示的拍摄的图像上标记关于所述目标对象的区域;基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸。Optionally, by photographing an image of the target object, the step of obtaining the actual size of the target object based on the photographing parameters of the target object may include: displaying the photographed image of the target object; responding to a user's operation , marking the area related to the target object on the captured image displayed on the screen; determining the actual size of the part of the target object corresponding to the marked area based on the number of pixels occupied by the marked area.

可选地,基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸的步骤可包括:基于拍摄图像时的像距和物距、标记的区域所占的像素点的数量,以及成像传感器的成像区域的尺寸与屏幕显示拍摄的图像的区域的分辨率之间的对应关系,确定所述目标对象的与标记的区域相应的部分的实际尺寸。Optionally, the step of determining the actual size of the portion of the target object corresponding to the marked area based on the number of pixels occupied by the marked area may include: based on the image distance and object distance when the image was captured, the marked area The number of occupied pixels and the corresponding relationship between the size of the imaging area of the imaging sensor and the resolution of the area where the captured image is displayed on the screen determine the actual size of the portion of the target object corresponding to the marked area.

可选地,标记的区域可是预定宽度的线条,其中,基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸的步骤可包括:基于拍摄图像时的像距和物距、所述预定宽度的线条所占的像素点的数量、所述预定宽度所对应的像素点的数量、以及成像传感器的成像区域的长度与屏幕显示拍摄的图像的区域的一列像素点的数量之间的比例关系,计算所述目标对象的与标记的线条相应的部分的实际尺寸。Optionally, the marked area may be a line with a predetermined width, wherein the step of determining the actual size of the portion of the target object corresponding to the marked area based on the number of pixels occupied by the marked area may include: based on the captured image image distance and object distance, the number of pixels occupied by the lines of the predetermined width, the number of pixels corresponding to the predetermined width, the length of the imaging area of the imaging sensor and the area where the screen displays the captured image The proportional relationship between the number of pixel points in a column, calculate the actual size of the part of the target object corresponding to the marked line.

可选地,所述参照物的显示参数可还包括所述参照物的显示角度,所述显示角度可表示拍摄所述参照物的图像时的实际拍摄角度,其中,获取目标对象的图像的步骤可包括:确定所述目标对象的显示角度;以所述参照物的显示角度为参照,选取所述目标对象的显示角度与所述参照物的显示角度相匹配的图像作为所述目标对象的图像。Optionally, the display parameters of the reference object may further include a display angle of the reference object, and the display angle may represent the actual shooting angle when the image of the reference object is captured, wherein the step of acquiring the image of the target object may include: determining the display angle of the target object; taking the display angle of the reference object as a reference, selecting an image whose display angle of the target object matches the display angle of the reference object as the image of the target object .

可选地,确定所述目标对象的显示角度的步骤可包括:在屏幕显示的拍摄的图像上将所述目标对象的被测角所对应的圆心弧标记为预定宽度的第一线条,并将与所述圆心弧对应的半径标记为预定宽度的第二线条,基于第一线条所占的像素点的数量与第二线条所占的像素点的数量之间的比例关系,确定所述目标对象被测角的实际角度作为所述目标对象的显示角度。Optionally, the step of determining the display angle of the target object may include: marking the central arc corresponding to the measured angle of the target object as a first line with a predetermined width on the captured image displayed on the screen, The radius corresponding to the central arc is marked as a second line with a predetermined width, and the target object is determined based on the proportional relationship between the number of pixels occupied by the first line and the number of pixels occupied by the second line The actual angle of the measured angle is used as the display angle of the target object.

可选地,可通过对所述参照物进行拍摄来获取所述参照物的图像以及所述参照物的显示参数。Optionally, an image of the reference object and display parameters of the reference object may be acquired by photographing the reference object.

根据本发明示例性实施例的另一方面,提供一种图像显示设备,所述图像显示设备包括:显示单元,显示参照物的图像;参数提取单元,提取所述参照物的显示参数;图像获取单元,获取目标对象的图像;尺寸确定单元,基于所述参照物的显示参数确定所述目标对象的成像尺寸,其中,显示单元在所述参照物的图像上按照所述目标对象的成像尺寸显示所述目标对象的图像。According to another aspect of an exemplary embodiment of the present invention, there is provided an image display device, the image display device comprising: a display unit that displays an image of a reference object; a parameter extraction unit that extracts display parameters of the reference object; image acquisition a unit for acquiring an image of a target object; a size determining unit for determining an imaging size of the target object based on a display parameter of the reference object, wherein the display unit displays the image of the reference object according to the imaging size of the target object image of the target object.

可选地,所述参照物的显示参数可包括所述参照物的显示比例系数,所述显示比例系数可表示所述参照物的实际尺寸与所述参照物的成像尺寸的比值。Optionally, the display parameter of the reference object may include a display scale coefficient of the reference object, and the display scale coefficient may represent a ratio of the actual size of the reference object to the imaged size of the reference object.

可选地,尺寸确定单元可确定所述目标对象的实际尺寸,根据所述参照物的显示比例系数和所述目标对象的实际尺寸确定所述目标对象的成像尺寸。Optionally, the size determination unit may determine the actual size of the target object, and determine the imaging size of the target object according to the display scale coefficient of the reference object and the actual size of the target object.

可选地,所述目标对象的成像尺寸可为所述目标对象的实际尺寸与所述参照物的显示比例系数的商。Optionally, the imaging size of the target object may be the quotient of the actual size of the target object and the display scale coefficient of the reference object.

可选地,尺寸确定单元可基于拍摄所述目标对象时的拍摄参数来获得所述目标对象的实际尺寸;或者尺寸确定单元可根据用户输入来获得所述目标对象的实际尺寸。Optionally, the size determination unit may obtain the actual size of the target object based on the shooting parameters when shooting the target object; or the size determination unit may obtain the actual size of the target object according to user input.

可选地,尺寸确定单元可响应于用户的操作,在屏幕显示的拍摄的所述目标对象的图像上标记关于所述目标对象的区域,基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸。Optionally, the size determination unit may, in response to a user's operation, mark an area about the target object on the captured image of the target object displayed on the screen, and determine the area based on the number of pixels occupied by the marked area. The actual size of the portion of the target object that corresponds to the marked area.

可选地,尺寸确定单元可基于拍摄图像时的像距和物距、标记的区域所占的像素点的数量,以及成像传感器的成像区域的尺寸与屏幕显示拍摄的图像的区域的分辨率之间的对应关系,确定所述目标对象的与标记的区域相应的部分的实际尺寸。Optionally, the size determination unit may be based on the image distance and object distance when the image is captured, the number of pixels occupied by the marked area, and the ratio between the size of the imaging area of the imaging sensor and the resolution of the area where the captured image is displayed on the screen. The corresponding relationship between them is determined, and the actual size of the part of the target object corresponding to the marked area is determined.

可选地,标记的区域可是预定宽度的线条,其中,尺寸确定单元可基于拍摄图像时的像距和物距、所述预定宽度的线条所占的像素点的数量、所述预定宽度所对应的像素点的数量、以及成像传感器的成像区域的长度与屏幕显示拍摄的图像的区域的一列像素点的数量之间的比例关系,计算所述目标对象的与标记的线条相应的部分的实际尺寸。Optionally, the marked area may be a line of a predetermined width, wherein the size determination unit may be based on the image distance and the object distance when the image is captured, the number of pixels occupied by the line of the predetermined width, and the corresponding width of the predetermined width. and the proportional relationship between the length of the imaging area of the imaging sensor and the number of pixels in one column of the area where the captured image is displayed on the screen, calculate the actual size of the portion of the target object corresponding to the marked line .

可选地,所述参照物的显示参数可还包括所述参照物的显示角度,所述显示角度可表示拍摄所述参照物的图像时的实际拍摄角度,其中,所述图像显示设备可还包括:角度确定单元,确定所述目标对象的显示角度,图像获取单元可以所述参照物的显示角度为参照,选取所述目标对象的显示角度与所述参照物的显示角度相匹配的图像作为所述目标对象的图像。Optionally, the display parameters of the reference object may further include a display angle of the reference object, and the display angle may represent an actual shooting angle when the image of the reference object is captured, wherein the image display device may further It includes: an angle determination unit, which determines the display angle of the target object, and the image acquisition unit can use the display angle of the reference object as a reference, and selects an image whose display angle of the target object matches the display angle of the reference object as a reference. image of the target object.

可选地,角度确定单元可在屏幕显示的拍摄的图像上将所述目标对象的被测角所对应的圆心弧标记为预定宽度的第一线条,并将与所述圆心弧对应的半径标记为预定宽度的第二线条,基于第一线条所占的像素点的数量与第二线条所占的像素点的数量之间的比例关系,确定所述目标对象被测角的实际角度作为所述目标对象的显示角度。Optionally, the angle determination unit may mark the central arc corresponding to the measured angle of the target object as a first line with a predetermined width on the captured image displayed on the screen, and mark the radius corresponding to the central arc. is a second line with a predetermined width, and based on the proportional relationship between the number of pixels occupied by the first line and the number of pixels occupied by the second line, determine the actual angle of the measured angle of the target object as the The display angle of the target object.

可选地,所述图像显示设备可还包括:参照物图像获取单元,通过对所述参照物进行拍摄来获取所述参照物的图像以及所述参照物的显示参数。Optionally, the image display device may further include: a reference object image acquisition unit, which acquires an image of the reference object and display parameters of the reference object by photographing the reference object.

根据本发明示例性实施例的再一方面,提供一种计算装置,包括:处理器;存储器,用于存储当被处理器执行使得处理器执行如上述的图像显示方法的程序指令。According to yet another aspect of an exemplary embodiment of the present invention, there is provided a computing device including: a processor; and a memory for storing program instructions that, when executed by the processor, cause the processor to execute the image display method as described above.

根据本发明示例性实施例的再一方面,提供一种计算机可读存储介质,存储有当被处理器执行时使得处理器执行如上述的图像显示方法的程序指令。According to yet another aspect of an exemplary embodiment of the present invention, there is provided a computer-readable storage medium storing program instructions that, when executed by a processor, cause the processor to execute the image display method as described above.

采用本发明示例性实施例的所述图像显示方法和设备,能够实现不同虚拟物体之间的智能搭配,以向用户呈现虚拟物体在现实中的搭配效果图。By using the image display method and device according to the exemplary embodiments of the present invention, intelligent collocation between different virtual objects can be realized, so as to present the collocation effect diagram of the virtual objects in reality to the user.

附图说明Description of drawings

通过下面结合示例性地示出实施例的附图进行的详细描述,本发明示例性实施例的上述和其它目的、特点和优点将会变得更加清楚,其中:The above and other objects, features and advantages of the exemplary embodiments of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings which exemplarily illustrate the embodiments, wherein:

图1示出根据本发明示例性实施例的图像显示方法的流程图;1 shows a flowchart of an image display method according to an exemplary embodiment of the present invention;

图2示出根据本发明示例性实施例的通过拍摄来获取目标对象的实际尺寸的步骤的流程图;FIG. 2 shows a flowchart of steps of acquiring the actual size of a target object by shooting according to an exemplary embodiment of the present invention;

图3至图5示出根据本发明示例性实施例的在电子终端通过拍摄目标对象来获取目标对象的实际尺寸的示例图;FIG. 3 to FIG. 5 illustrate exemplary diagrams of acquiring the actual size of the target object by photographing the target object at an electronic terminal according to an exemplary embodiment of the present invention;

图6至图10示出根据本发明示例性实施例的在电子终端将参照物与目标对象进行搭配的示例图;6 to 10 illustrate exemplary diagrams of matching a reference object with a target object at an electronic terminal according to an exemplary embodiment of the present invention;

图11示出根据本发明示例性实施例的图像显示设备的结构图。FIG. 11 shows a block diagram of an image display apparatus according to an exemplary embodiment of the present invention.

具体实施方式Detailed ways

现在,将参照附图更充分地描述不同的示例实施例,其中,一些示例性实施例在附图中示出。Various example embodiments will now be described more fully with reference to the accompanying drawings, in which some example embodiments are shown.

图1示出根据本发明示例性实施例的图像显示方法的流程图。FIG. 1 shows a flowchart of an image display method according to an exemplary embodiment of the present invention.

参照图1,在步骤S10中,显示参照物的图像,并提取所述参照物的显示参数。Referring to FIG. 1, in step S10, an image of a reference object is displayed, and display parameters of the reference object are extracted.

一种情况,可从参照物的图像中提取该参照物的显示参数。In one case, the display parameters of the reference object can be extracted from the image of the reference object.

在一个示例中,通过对参照物进行拍摄来获取该参照物的图像以及参照物的显示参数,并将参照物的显示参数插入到参照物的图像中。例如,可基于拍摄该参照物时的拍摄参数来产生该参照物的显示参数,也就是说,参照物的图像所携带的显示参数可基于对参照物进行拍摄时的拍摄参数而被确定。从而步骤S10在获取并显示参照物的图像之后,可从参照物的图像中提取该参照物的显示参数。In one example, an image of the reference object and display parameters of the reference object are acquired by photographing the reference object, and the display parameters of the reference object are inserted into the image of the reference object. For example, the display parameters of the reference object can be generated based on the shooting parameters when the reference object is shot, that is, the display parameters carried by the image of the reference object can be determined based on the shooting parameters when the reference object is shot. Therefore, after acquiring and displaying the image of the reference object in step S10, the display parameters of the reference object can be extracted from the image of the reference object.

例如,参照物的拍摄参数可包括拍摄参照物时的物距和像距、参照物的成像尺寸,参照物的显示参数可包括参照物的显示比例系数,显示比例系数可表示参照物的实际尺寸与参照物的成像尺寸的比值。这里,可基于参照物的拍摄参数来确定出参照物的实际尺寸,再计算参照物的实际尺寸与参照物的成像尺寸的比值以获得参照物的显示比例系数。For example, the shooting parameters of the reference object may include the object distance and image distance when shooting the reference object, and the imaging size of the reference object, the display parameters of the reference object may include the display scale coefficient of the reference object, and the display scale coefficient may represent the actual size of the reference object The ratio of the imaged size of the reference object. Here, the actual size of the reference object can be determined based on the shooting parameters of the reference object, and then the ratio of the actual size of the reference object to the imaging size of the reference object is calculated to obtain the display scale coefficient of the reference object.

这里,优选地,确定参照物的实际尺寸的步骤与后续确定目标对象的实际尺寸的步骤相同,本发明将在后续介绍确定目标对象的实际尺寸的步骤时进行详细说明。Here, preferably, the step of determining the actual size of the reference object is the same as the subsequent step of determining the actual size of the target object, and the present invention will be described in detail when the step of determining the actual size of the target object is introduced later.

在另一示例中,可接收用户输入的参照物的显示参数,并将接收的显示参数插入到参照物的图像中。也就是说,参照物的图像所携带的显示参数可根据用户的输入而被确定。从而步骤S10在获取并显示参照物的图像之后,从参照物的图像中提取该参照物的显示参数。In another example, display parameters of the reference object input by the user may be received, and the received display parameters may be inserted into the image of the reference object. That is, the display parameters carried by the image of the reference object can be determined according to the user's input. Therefore, in step S10, after the image of the reference object is acquired and displayed, the display parameters of the reference object are extracted from the image of the reference object.

另一种情况,可接收用户输入的该参照物的实际尺寸,并基于参照物的实际尺寸和参照物的成像尺寸来确定参照物的显示参数。In another case, the actual size of the reference object input by the user may be received, and the display parameters of the reference object may be determined based on the actual size of the reference object and the imaged size of the reference object.

优选地,参照物的显示参数可为参照物的显示比例系数,例如,可基于参照物的图像来获取参照物的成像尺寸,接收用户输入的该参照物的实际尺寸,计算参照物的实际尺寸与参照物的成像尺寸的比值来获得参照物的显示比例系数。这里,可利用现有的各种方法来基于参照物的图像来获取参照物的成像尺寸,本发明对此部分内容不再赘述。Preferably, the display parameter of the reference object may be a display scale coefficient of the reference object, for example, the imaging size of the reference object may be acquired based on the image of the reference object, the actual size of the reference object input by the user is received, and the actual size of the reference object is calculated The ratio of the imaging size of the reference object to obtain the display scale factor of the reference object. Here, various existing methods can be used to obtain the imaging size of the reference object based on the image of the reference object, and the present invention will not describe this part of the content again.

在步骤S20中,获取目标对象的图像。In step S20, an image of the target object is acquired.

可选地,获取目标对象的图像的步骤可包括:在原始图像上标记关于该目标对象的区域,截取所述区域的图像,并将截取的所述区域的图像作为目标对象的图像。即,从原始图像中去除背景部分,仅保留目标对象的区域。这里,原始图像可为对目标对象进行拍摄获得的图像或者从网络(或电子终端本地)获取的关于目标对象的图像。相应地,参照物的图像可以是指去除背景部分仅保留参照物的区域的图像,也可以是参照物的原始图像。Optionally, the step of acquiring the image of the target object may include: marking an area related to the target object on the original image, intercepting the image of the area, and using the intercepted image of the area as the image of the target object. That is, the background part is removed from the original image, leaving only the area of the target object. Here, the original image may be an image obtained by photographing the target object or an image about the target object obtained from a network (or locally in an electronic terminal). Correspondingly, the image of the reference object may refer to an image in which the background part is removed and only the region of the reference object remains, or may be an original image of the reference object.

优选地,参照物的显示参数可还包括参照物的显示角度,参照物的显示角度可表示拍摄该参照物的图像时的实际拍摄角度。为获得参照物与目标对象更佳的搭配效果,可使得参照物与目标对象在尺寸和显示角度上均保持一致。在此情况下,获取目标对象的图像的步骤可包括:确定目标对象的显示角度;以所述参照物的显示角度为参照,选取目标对象的显示角度与参照物的显示角度相匹配的图像作为目标对象的图像。Preferably, the display parameters of the reference object may further include a display angle of the reference object, and the display angle of the reference object may represent an actual shooting angle when an image of the reference object is captured. In order to obtain a better matching effect between the reference object and the target object, the reference object and the target object can be kept consistent in size and display angle. In this case, the step of acquiring the image of the target object may include: determining the display angle of the target object; taking the display angle of the reference object as a reference, selecting the image whose display angle of the target object matches the display angle of the reference object as the reference object. The image of the target object.

例如,可在显示参照物的图像的同时还显示参照物的显示角度,在确定目标对象的显示角度之后也显示该目标对象的显示角度,可(根据用户的选择操作)将所有目标对象的图像中目标对象的显示角度与参照物的显示角度最接近(即,相匹配)的图像确定为目标对象的图像。For example, the display angle of the reference object may be displayed at the same time as the image of the reference object, the display angle of the target object may also be displayed after the display angle of the target object is determined, and the images of all the target objects may be displayed (according to the user's selection operation) The image in which the display angle of the target object is closest to (ie, matches) the display angle of the reference object is determined as the image of the target object.

这里,可从参照物的图像中提取参照物的显示角度并进行显示。应理解,确定参照物的显示角度的步骤与确定目标对象的显示角度的步骤可相同,下面以目标对象为例,来介绍确定目标对象的显示角度的步骤。Here, the display angle of the reference object can be extracted from the image of the reference object and displayed. It should be understood that the steps of determining the display angle of the reference object may be the same as the steps of determining the display angle of the target object. The following takes the target object as an example to introduce the steps of determining the display angle of the target object.

具体说来,确定目标对象的显示角度的步骤可包括:在屏幕显示的目标对象的图像(如拍摄的图像)上将目标对象的被测角所对应的圆心弧标记为预定宽度的第一线条,并将与所述圆心弧对应的半径标记为预定宽度的第二线条,基于第一线条所占的像素点的数量与第二线条所占的像素点的数量之间的比例关系,确定所述目标对象被测角的实际角度作为所述目标对象的显示角度。Specifically, the step of determining the display angle of the target object may include: marking the central arc corresponding to the measured angle of the target object as a first line with a predetermined width on the image of the target object displayed on the screen (eg, a captured image) , and mark the radius corresponding to the central arc as a second line of predetermined width, based on the proportional relationship between the number of pixels occupied by the first line and the number of pixels occupied by the second line, determine the The actual angle of the measured angle of the target object is used as the display angle of the target object.

作为示例,可接收用户的操作在屏幕显示的目标对象的图像上标记关于被测对象的区域,该用户操作可以是使预定长度的线段的一个端点处于被测对象的被测角的顶点位置且所述线段位于被测角的一条边,然后以所述顶点为圆心、所述预定长度为半径,由所述线段的另一个端点开始画弧线,从而在屏幕显示的拍摄的图像上标记的是沿所述弧线的预定宽度的第一线条和沿所述线段的预定宽度的第二线条。应该理解,也可使用其他适合的方式来标记第一线条和第二线条。As an example, a user's operation may be received to mark an area about the measured object on the image of the target object displayed on the screen, and the user operation may be to make one end point of a line segment of a predetermined length at the vertex position of the measured angle of the measured object and The line segment is located on one side of the measured angle, and then, taking the vertex as the center and the predetermined length as the radius, an arc is drawn from the other end point of the line segment, so as to mark the image on the captured image displayed on the screen. are a first line of predetermined width along the arc and a second line of predetermined width along the line segment. It should be understood that other suitable ways of marking the first line and the second line may also be used.

例如,可通过下面的等式来计算被测对象的被测角的实际角度 For example, the actual angle of the measured angle of the measured object can be calculated by the following equation

公式(1)中,l指示第一线条所占的像素点的数量,r指示第二线条所占的像素点的数量。In formula (1), l indicates the number of pixels occupied by the first line, and r indicates the number of pixels occupied by the second line.

应理解,上述计算目标对象的显示角度的方式仅为示例,本发明不限于此,可利用现有的各种方式来确定参照物或目标对象的显示角度。It should be understood that the above method for calculating the display angle of the target object is only an example, and the present invention is not limited thereto, and various existing methods can be used to determine the display angle of the reference object or the target object.

在步骤S30中,基于所述参照物的显示参数确定所述目标对象的成像尺寸。当所述参照物的显示参数包括所述参照物的显示比例系数时,可基于参照物的显示比例系数来确定目标对象的成像尺寸。In step S30, the imaging size of the target object is determined based on the display parameters of the reference object. When the display parameter of the reference object includes the display scale coefficient of the reference object, the imaging size of the target object may be determined based on the display scale coefficient of the reference object.

具体说来,基于所述参照物的显示比例系数确定所述目标对象的成像尺寸的步骤可包括:确定目标对象的实际尺寸,根据参照物的显示比例系数和目标对象的实际尺寸确定目标对象的成像尺寸。例如,目标对象的成像尺寸为目标对象的实际尺寸与参照物的显示比例系数的商。Specifically, the step of determining the imaging size of the target object based on the display scale coefficient of the reference object may include: determining the actual size of the target object, and determining the size of the target object according to the display scale coefficient of the reference object and the actual size of the target object. Image size. For example, the imaging size of the target object is the quotient of the actual size of the target object and the display scale coefficient of the reference object.

在一个示例中,可根据用户输入来获得目标对象的实际尺寸。In one example, the actual size of the target object may be obtained from user input.

例如,在获取目标对象的图像之后,可根据用户的操作在屏幕显示的目标对象的图像上标记关于目标对象的区域,并接收用户输入的该目标对象的区域的实际尺寸(即为目标对象的实际尺寸)。For example, after acquiring the image of the target object, an area related to the target object may be marked on the image of the target object displayed on the screen according to the user's operation, and the actual size of the area of the target object (that is, the actual size of the area of the target object) input by the user is received. Actual size).

在另一示例中,可通过拍摄目标对象的图像,基于目标对象的拍摄参数来获得目标对象的实际尺寸。In another example, the actual size of the target object may be obtained based on photographing parameters of the target object by photographing an image of the target object.

下面参照图2来详细介绍通过拍摄目标对象来获取目标对象的实际尺寸的步骤。The steps of acquiring the actual size of the target object by photographing the target object will be described in detail below with reference to FIG. 2 .

图2示出根据本发明示例性实施例的通过拍摄目标对象来获取目标对象的实际尺寸的步骤的流程图。FIG. 2 shows a flowchart of the steps of acquiring the actual size of the target object by photographing the target object according to an exemplary embodiment of the present invention.

参照图2,在步骤S201中,显示拍摄的目标对象的图像。例如,可利用电子终端上的图像拍摄装置(例如,摄像头)对目标对象进行拍摄,以产生相应的清晰的图像,进而显示拍摄的图像。优选地,可对焦被摄对象来拍摄目标对象的图像。Referring to FIG. 2 , in step S201 , a photographed image of a target object is displayed. For example, an image capturing device (eg, a camera) on the electronic terminal may be used to capture the target object, so as to generate a corresponding clear image, and then display the captured image. Preferably, the subject can be focused to capture an image of the target subject.

在步骤S202中,响应于用户的操作,在屏幕显示的拍摄的图像上标记关于所述目标对象的区域。换言之,用户在屏幕显示的拍摄的图像上标记与其想要获得的目标对象的部分相应的区域。In step S202, in response to the user's operation, an area related to the target object is marked on the captured image displayed on the screen. In other words, the user marks the area corresponding to the portion of the target object he wants to obtain on the captured image displayed on the screen.

作为示例,标记的区域可以是预定宽度的线条,也可以是任意形状的区域。这里,所述预定宽度的线条可以是以下形状之中的至少一项:直线、曲线和折线。预定宽度可设置为M个像素点。可由用户设置M值,也可根据屏幕的分辨率来设置M值。As an example, the marked area may be a line of a predetermined width, or may be an area of any shape. Here, the line of the predetermined width may be at least one of the following shapes: a straight line, a curved line, and a broken line. The predetermined width can be set to M pixels. The M value can be set by the user, or can be set according to the resolution of the screen.

例如,步骤S202中的用户操作可以是利用触摸物(例如,手写笔或手指等)点击屏幕显示的拍摄的图像上的一点,并从该点开始滑动,从而在屏幕显示的拍摄的图像上标记的是沿滑动轨迹的预定宽度的线条。For example, the user operation in step S202 may be to use a touch object (for example, a stylus or a finger, etc.) to click on a point on the captured image displayed on the screen, and start sliding from this point, thereby marking the captured image displayed on the screen. is a line of predetermined width along the sliding track.

例如,步骤S202中的用户操作还可以是利用触摸物依次点击屏幕显示的拍摄的图像上的多点,从而在屏幕显示的拍摄的图像上标记的是按照点击的先后顺序依次连接所述多点的预定宽度的折线线条。For example, the user operation in step S202 may also be to use a touch object to click multiple points on the captured image displayed on the screen in sequence, so that the captured image displayed on the screen is marked to connect the multiple points in the sequence of the clicks. A polyline of predetermined width.

在步骤S203中,基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸。In step S203, the actual size of the portion of the target object corresponding to the marked area is determined based on the number of pixels occupied by the marked area.

基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸的步骤包括:The step of determining the actual size of the portion of the target object corresponding to the marked area based on the number of pixels occupied by the marked area includes:

基于拍摄图像时的像距和物距、标记的区域所占的像素点的数量,以及成像传感器的成像区域的尺寸与屏幕显示拍摄的图像的区域的分辨率之间的对应关系,确定所述目标对象的与标记的区域相应的部分的实际尺寸。Determine the said The actual size of the portion of the target object that corresponds to the marked area.

这里,屏幕显示拍摄的图像的区域的分辨率是指:屏幕显示拍摄的图像的区域的像素点的数量。例如,如果屏幕显示拍摄的图像的区域的分辨为240*320,则指的是该区域的一行像素点的数量为240、一列像素点的数量为320。Here, the resolution of the area where the screen displays the captured image refers to the number of pixels in the area where the screen displays the captured image. For example, if the resolution of the area in which the captured image is displayed on the screen is 240*320, it means that the number of pixels in one row of the area is 240 and the number of pixels in one column is 320.

可根据各种适合的方式来获取拍摄图像时的物距,例如,可利用电子终端的距离传感器来测量拍摄图像时的物距,也可基于拍摄图像时的焦距和像距计算得到拍摄图像时的物距。The object distance when the image is captured can be obtained according to various suitable methods. For example, the distance sensor of the electronic terminal can be used to measure the object distance when the image is captured, or the time when the image is captured can be calculated based on the focal length and image distance when the image is captured. object distance.

作为示例,标记的区域可是预定宽度的线条,在步骤S203可基于拍摄图像时的像距和物距、所述预定宽度的线条所占的像素点的数量、所述预定宽度所对应的像素点的数量、以及成像传感器的成像区域的长度与屏幕显示拍摄的图像的区域的长度方向上的一列像素点的数量之间的比例关系,计算被测对象的与标记的线条相应的部分的实际长度。此外,也可基于拍摄图像时的像距和物距、所述预定宽度的线条所占的像素点的数量、所述预定宽度所对应的像素点的数量、以及电子终端的成像传感器的成像区域的宽度与屏幕显示拍摄的图像的区域的宽度方向上的一行像素点的数量之间的比例关系,计算被测对象的与标记的线条相应的部分的实际长度。As an example, the marked area may be a line with a predetermined width. In step S203, the image distance and the object distance when the image is captured, the number of pixels occupied by the line with the predetermined width, and the pixels corresponding to the predetermined width may be used. Calculate the actual length of the measured object corresponding to the marked line . In addition, it may also be based on the image distance and object distance when the image is captured, the number of pixels occupied by the lines of the predetermined width, the number of pixels corresponding to the predetermined width, and the imaging area of the imaging sensor of the electronic terminal. The proportional relationship between the width of the screen and the number of pixels in a line in the width direction of the area where the captured image is displayed on the screen, calculate the actual length of the portion of the measured object corresponding to the marked line.

例如,可通过下面的等式(2)来计算被测对象的与标记的线条相应的部分的实际尺寸(即实际长度)L:For example, the actual size (ie, the actual length) L of the portion of the measured object corresponding to the marked line can be calculated by the following equation (2):

公式(2)中,u和v分别指示拍摄图像时的物距和像距,Lsensor指示电子终端的成像传感器的成像区域的长度,Lpixel指示屏幕显示拍摄的图像的区域的长度方向上的一列像素点的数量,n指示所述预定宽度的线条所占的像素点的数量、M指示所述预定宽度所对应的像素点的数量。In formula (2), u and v respectively indicate the object distance and image distance when capturing an image, L sensor indicates the length of the imaging area of the imaging sensor of the electronic terminal, and L pixel indicates the length of the area where the screen displays the captured image. The number of pixels in a column, n indicates the number of pixels occupied by lines of the predetermined width, and M indicates the number of pixels corresponding to the predetermined width.

此外,也可通过下面的等式(3)来计算被测对象的与标记的线条相应的部分的实际尺寸(即实际长度)L:In addition, the actual size (ie, actual length) L of the portion of the measured object corresponding to the marked line can also be calculated by the following equation (3):

公式(3)中,u和v分别指示拍摄图像时的物距和像距,Wsensor指示电子终端的成像传感器的成像区域的宽度,Wpixel指示屏幕显示拍摄的图像的区域的宽度方向上的一行像素点的数量,n指示所述预定宽度的线条所占的像素点的数量、M指示所述预定宽度所对应的像素点的数量。In formula (3), u and v respectively indicate the object distance and the image distance when capturing an image, W sensor indicates the width of the imaging area of the imaging sensor of the electronic terminal, and W pixel indicates the width of the area in which the captured image is displayed on the screen. The number of pixels in a line, n indicates the number of pixels occupied by the line of the predetermined width, and M indicates the number of pixels corresponding to the predetermined width.

应理解,上述计算目标对象的实际尺寸的方式仅为示例,本发明不限于此,可利用现有的各种方式来确定参照物或目标对象的实际尺寸。此外,还可预先将目标对象的实际尺寸(或显示角度)插入到目标对象的图像中,从而可从目标对象的图像中提取目标对象的实际尺寸(或显示角度)。It should be understood that the above method for calculating the actual size of the target object is only an example, and the present invention is not limited thereto, and various existing methods can be used to determine the actual size of the reference object or the target object. In addition, the actual size (or display angle) of the target object can also be inserted into the image of the target object in advance, so that the actual size (or display angle) of the target object can be extracted from the image of the target object.

返回图1,在步骤S40中,在所述参照物的图像上按照所述目标对象的成像尺寸显示所述目标对象的图像。Returning to FIG. 1 , in step S40 , the image of the target object is displayed on the image of the reference object according to the imaging size of the target object.

优选地,根据本发明示例性实施例的所述图像显示方法可还包括:响应于对目标对象的图像的拖拽操作,改变目标对象的图像在参照物的图像上的显示位置。例如,还可在确定目标对象的图像在参照物的图像上的显示位置之后,输出目标对象和参照物的合成效果图像,以供用户进行参考。Preferably, the image display method according to an exemplary embodiment of the present invention may further include: in response to a drag operation on the image of the target object, changing a display position of the image of the target object on the image of the reference object. For example, after determining the display position of the image of the target object on the image of the reference object, a composite effect image of the target object and the reference object can be output for the user's reference.

应理解,上述根据本发明示例性实施例的图像显示方法可在电子终端中执行,作为示例,所述电子终端可以是移动通信终端(例如,智能手机)、平板电脑、个人数字助理、数字多媒体播放器、照相机等具有显示屏幕的电子设备。It should be understood that the above-mentioned image display method according to the exemplary embodiment of the present invention may be executed in an electronic terminal, as an example, the electronic terminal may be a mobile communication terminal (eg, a smart phone), a tablet computer, a personal digital assistant, a digital multimedia Players, cameras, and other electronic devices that have a display screen.

图3至图5示出根据本发明示例性实施例的在电子终端通过拍摄来获取目标对象的实际尺寸的示例图。FIG. 3 to FIG. 5 illustrate exemplary diagrams of acquiring the actual size of a target object by photographing at an electronic terminal according to an exemplary embodiment of the present invention.

图3示出根据本发明示例实施例的电子终端的拍摄界面,在该拍摄界面中可新增“AR识物”选项,当接收到用户对该“AR识物”选项的选择操作并进行拍摄时,将拍摄图像时的拍摄参数和/或被摄对象(可指目标对象/参照物,如图中所示沙发)的显示参数(和/或被摄对象的实际尺寸)插入到被摄对象的图像中一同存储。即,基于“AR识物”功能所拍摄的图像是携带了拍摄参数和/或被摄对象的显示参数(和/或被摄对象的实际尺寸)的图像。FIG. 3 shows a photographing interface of an electronic terminal according to an exemplary embodiment of the present invention. In the photographing interface, an “AR identification object” option can be added. When a user’s selection operation of the “AR identification object” option is received, a photograph is taken. , insert the shooting parameters and/or the display parameters (and/or the actual size of the subject) of the subject (which may refer to the target object/reference object, as shown in the figure) (and/or the actual size of the subject) at the time of shooting the image into the subject stored with the image. That is, the image captured based on the "AR object recognition" function is an image that carries the shooting parameters and/or the display parameters of the subject (and/or the actual size of the subject).

优选地,可对被摄对象进行多角度拍摄(如图4所示),已便于找到与参照物的显示角度一致的目标对象的图像。此外,在对被摄对象进行多角度拍摄之后,可分别确定不同拍摄角度对应的被摄对象的拍摄参数,并基于拍摄参数确定出在每个拍摄角度下的被摄对象的实际尺寸,以及不同拍摄角度获得的被摄对象的显示参数(如,显示比例系数/显示角度)。Preferably, the subject can be photographed from multiple angles (as shown in FIG. 4 ), which facilitates finding an image of the target object that is consistent with the display angle of the reference object. In addition, after multi-angle shooting of the subject, the shooting parameters of the subject corresponding to different shooting angles can be determined respectively, and the actual size of the subject at each shooting angle and the different shooting parameters can be determined based on the shooting parameters. Display parameters of the subject obtained from the shooting angle (eg, display scale factor/display angle).

作为示例,可利用现有的各种优化算法(例如,最小二乘法、均方根法等)来基于多个被摄对象的显示比例系数获得一最优的显示比例系数,以及基于多角度拍摄的图像确定被摄对象的实际尺寸(如图5所示,确定沙发的长、宽、高)。此时,将该最优的显示比例系数作为被摄对象的显示比例系数,即,不同拍摄角度获得的被摄对象的显示比例系数均为该最优的显示比例系数。As an example, various existing optimization algorithms (eg, least squares method, root mean square method, etc.) can be used to obtain an optimal display scale coefficient based on the display scale coefficients of multiple subjects, and based on multi-angle shooting The image to determine the actual size of the subject (as shown in Figure 5, determine the length, width and height of the sofa). At this time, the optimal display scale coefficient is used as the display scale coefficient of the subject, that is, the display scale coefficients of the subject obtained from different shooting angles are all the optimal display scale coefficients.

图6至图10示出根据本发明示例性实施例的在电子终端将参照物与目标对象进行搭配的示例图。在本示例中,以参照物为房间、目标对象为沙发为例来进行介绍。FIG. 6 to FIG. 10 show exemplary diagrams of collocating a reference object with a target object at an electronic terminal according to an exemplary embodiment of the present invention. In this example, the reference object is a room and the target object is a sofa.

这里,可利用图3至图5所示的过程来对参照物(即,房间)进行拍摄。例如,首先进入电子终端的拍摄界面,并选择AR识物模式,多次拍摄房间各个角度的图像用来获得房间的精确尺寸,最终通过优化算法确定每面墙的尺寸,保存房间的图像。此时,房间的图像中包含了拍摄参数、房间的显示比例系数等信息。以一面墙的尺寸为例,比如客厅中主墙(参照物)尺寸为长5米、高2.7米。在显示的房间的图像中,可将长5米的墙缩放至5厘米进行显示,此时显示比例系数η可为5米/5厘米=100。Here, a reference object (ie, a room) may be photographed using the procedures shown in FIGS. 3 to 5 . For example, first enter the shooting interface of the electronic terminal, select the AR object recognition mode, shoot images from various angles of the room multiple times to obtain the precise size of the room, and finally determine the size of each wall through an optimization algorithm and save the image of the room. At this time, the image of the room includes information such as shooting parameters and a display scale factor of the room. Take the size of one wall as an example. For example, the main wall (reference object) in the living room is 5 meters long and 2.7 meters high. In the displayed image of the room, a wall with a length of 5 meters can be scaled to 5 centimeters for display, and at this time, the display scale coefficient η can be 5 meters/5 centimeters=100.

此外,可在家具店对沙发进行拍摄来自动确定沙发的实际尺寸,也可从网络购物平台获得沙发的图像和实际尺寸,然后在后续图像合成过程中手动输入沙发的实际尺寸,优选地,沙发的图像中可存储了沙发的实际尺寸,此时在图像合成过程中可从沙发的图像中提取沙发的实际尺寸。In addition, the actual size of the sofa can be automatically determined by photographing the sofa in the furniture store, or the image and actual size of the sofa can be obtained from an online shopping platform, and then the actual size of the sofa can be manually input in the subsequent image synthesis process, preferably, the sofa The actual size of the sofa can be stored in the image of , and the actual size of the sofa can be extracted from the image of the sofa during the image synthesis process.

在电子终端的屏幕显示房间(参照物)的图像,并基于对显示的房间的图像的快捷菜单中的“添加AR识物”选项的选择操作(如图6所示),进入用于选择目标对象的图像的界面(如图7所示),可根据用户的操作(如对“相册”选项的选择操作)从该界面(此时,界面中显示电子终端的相册中存储的图像的缩略图)中选择一张图像作为目标对象(如沙发)的图像,还可根据用户的操作(如对“相机”选项的选择操作)控制电子终端进入拍摄界面以拍摄目标对象的图像。当获取了目标对象的原始图像(如,拍摄的目标对象的图像/从相册中选中的目标对象的图像)之后,可控制电子终端进入目标对象的图像的编辑界面,在该编辑界面上根据用户的操作来标记关于目标对象的区域(如图8所示),将截取的所述区域的图像作为目标对象的图像,基于房间的显示比例系数确定沙发的成像尺寸(如图9所示,通过计算得到沙发在房间中的尺寸应该是长:2.35米/100=2.35厘米,宽:1.1米/100=1.1厘米,高0.9米/100=0.9厘米),并在房间的图像上以确定的成像尺寸来显示沙发的图像。此时,用户可以手动旋转及调整沙发在房间中的位置、方向等,并呈现房间与沙发的合成效果图(如图10所示),用户可以直观的看到买到该家具后放在家中的实际效果,然后可以提前判断该家具是否符合自己家的装修风格等。The image of the room (reference object) is displayed on the screen of the electronic terminal, and based on the selection operation of the “Add AR ID” option in the shortcut menu of the displayed image of the room (as shown in FIG. 6 ), the user enters the object for selecting the object. The interface of the image of the object (as shown in FIG. 7 ) can be displayed according to the user’s operation (such as the selection operation of the “Album” option) from the interface (at this time, the thumbnail of the image stored in the album of the electronic terminal is displayed in the interface). ), select an image as the image of the target object (such as a sofa), and can also control the electronic terminal to enter the shooting interface according to the user's operation (such as the selection operation of the "camera" option) to shoot the image of the target object. After acquiring the original image of the target object (for example, the image of the captured target object/the image of the target object selected from the album), the electronic terminal can be controlled to enter the editing interface of the image of the target object, on the editing interface according to the user operation to mark the area about the target object (as shown in Figure 8), take the captured image of the area as the image of the target object, and determine the imaging size of the sofa based on the display scale factor of the room (as shown in Figure 9, through Calculate the size of the sofa in the room should be length: 2.35m/100=2.35cm, width: 1.1m/100=1.1cm, height 0.9m/100=0.9cm), and determine the imaging on the image of the room size to display the image of the sofa. At this time, the user can manually rotate and adjust the position, direction, etc. of the sofa in the room, and present the composite effect diagram of the room and the sofa (as shown in Figure 10). The user can intuitively see that the furniture is bought and placed at home Then you can judge in advance whether the furniture conforms to the decoration style of your own home.

根据本发明示例性实施例的图像像是方法可获得不同虚拟对象在现实中真实搭配的效果图,并使得参照物与目标对象相对实际尺寸具有统一比例,达到了实物一对一匹配的效果。The image imaging method according to the exemplary embodiment of the present invention can obtain the effect diagram of the real matching of different virtual objects in reality, and make the reference object and the target object have a uniform proportion relative to the actual size, and achieve the effect of one-to-one matching of real objects.

图11示出根据本发明示例性实施例的图像显示设备的结构图。FIG. 11 shows a block diagram of an image display apparatus according to an exemplary embodiment of the present invention.

如图11所示,根据本发明示例性实施例的图像显示设备包括:参数提取单元10、图像获取单元20、尺寸确定单元30和显示单元40。As shown in FIG. 11 , an image display apparatus according to an exemplary embodiment of the present invention includes a parameter extraction unit 10 , an image acquisition unit 20 , a size determination unit 30 , and a display unit 40 .

具体说来,显示单元40显示参照物的图像,参数提取单元10提取所述参照物的显示参数。Specifically, the display unit 40 displays an image of the reference object, and the parameter extraction unit 10 extracts display parameters of the reference object.

一种情况,参数提取单元10可从参照物的图像中提取该参照物的显示参数。In one case, the parameter extraction unit 10 may extract the display parameters of the reference object from the image of the reference object.

在一个示例中,参照物的图像所携带的显示参数可基于对参照物进行拍摄时的拍摄参数被确定。In one example, the display parameters carried by the image of the reference object may be determined based on the shooting parameters when the reference object is shot.

例如,根据本发明示例性实施例的图像显示设备可还包括参照物图像获取单元,通过对参照物进行拍摄来获取该参照物的图像以及参照物的显示参数,并将参照物的显示参数插入到参照物的图像中进行存储。例如,参照物图像获取单元可基于拍摄该参照物时的拍摄参数来产生该参照物的显示参数,这样参数提取单元10可从参照物的图像中提取该参照物的显示参数。For example, an image display apparatus according to an exemplary embodiment of the present invention may further include a reference object image acquisition unit that acquires an image of the reference object and display parameters of the reference object by photographing the reference object, and inserts the display parameters of the reference object into to the image of the reference object for storage. For example, the reference object image acquisition unit may generate display parameters of the reference object based on the shooting parameters of the reference object, so that the parameter extraction unit 10 may extract the display parameters of the reference object from the image of the reference object.

在另一示例中,参照物的图像所携带的显示参数可根据用户的输入而被确定。例如,可接收用户输入的参照物的显示参数,并将接收的显示参数插入到参照物的图像中,使得参数提取单元10可从参照物的图像中提取该参照物的显示参数。In another example, the display parameters carried by the image of the reference object may be determined according to the user's input. For example, the display parameters of the reference object input by the user may be received, and the received display parameters may be inserted into the image of the reference object, so that the parameter extraction unit 10 may extract the display parameters of the reference object from the image of the reference object.

另一种情况,可接收用户输入的该参照物的实际尺寸,并基于参照物的实际尺寸和参照物的成像尺寸来确定参照物的显示参数。In another case, the actual size of the reference object input by the user may be received, and the display parameters of the reference object may be determined based on the actual size of the reference object and the imaged size of the reference object.

优选地,参照物的显示参数可为参照物的显示比例系数,例如,参数提取单元10可基于参照物的图像来获取参照物的成像尺寸,显示单元40可接收用户输入的该参照物的实际尺寸,参数提取单元10计算参照物的实际尺寸与参照物的成像尺寸的比值来获得参照物的显示比例系数。Preferably, the display parameter of the reference object may be a display scale coefficient of the reference object. For example, the parameter extraction unit 10 may obtain the imaging size of the reference object based on the image of the reference object, and the display unit 40 may receive the actual size of the reference object input by the user. size, the parameter extraction unit 10 calculates the ratio of the actual size of the reference object to the imaged size of the reference object to obtain the display scale coefficient of the reference object.

由于已经在步骤S10中对参数提取单元10提取参照物的显示参数的过程进行了详细描述,本发明对此不再赘述。Since the process of extracting the display parameters of the reference object by the parameter extracting unit 10 has been described in detail in step S10, the present invention will not repeat them.

图像获取单元20获取目标对象的图像。The image acquisition unit 20 acquires an image of the target object.

作为示例,参照物的显示参数可还包括参照物的显示角度,显示角度表示拍摄所述参照物的图像时的实际拍摄角度。As an example, the display parameter of the reference object may further include a display angle of the reference object, and the display angle represents the actual shooting angle when the image of the reference object is shot.

可选地,根据本发明示例性实施例的所述图像显示设备可还包括:角度确定单元,确定所述目标对象的显示角度,图像获取单元20以所述参照物的显示角度为参照,选取所述目标对象的显示角度与所述参照物的显示角度相匹配的图像作为所述目标对象的图像。Optionally, the image display device according to the exemplary embodiment of the present invention may further include: an angle determination unit, which determines the display angle of the target object, and the image acquisition unit 20 uses the display angle of the reference object as a reference to select An image whose display angle of the target object matches the display angle of the reference object is used as the image of the target object.

例如,角度确定单元在屏幕显示的拍摄的图像上将所述目标对象的被测角所对应的圆心弧标记为预定宽度的第一线条,并将与所述圆心弧对应的半径标记为预定宽度的第二线条,基于第一线条所占的像素点的数量与第二线条所占的像素点的数量之间的比例关系,确定所述目标对象被测角的实际角度作为所述目标对象的显示角度。For example, the angle determination unit marks the central arc corresponding to the measured angle of the target object as a first line with a predetermined width on the captured image displayed on the screen, and marks the radius corresponding to the central arc as the predetermined width The second line, based on the proportional relationship between the number of pixels occupied by the first line and the number of pixels occupied by the second line, determine the actual angle of the measured angle of the target object as the target object's actual angle. Display angle.

由于已经在步骤S20中对图像获取单元20获取目标对象的图像的过程进行了详细描述,本发明对此不再赘述。Since the process of acquiring the image of the target object by the image acquiring unit 20 has been described in detail in step S20, the present invention will not repeat it.

尺寸确定单元30基于所述参照物的显示参数确定所述目标对象的成像尺寸。当所述参照物的显示参数包括所述参照物的显示比例系数时,尺寸确定单元30可基于参照物的显示比例系数来确定目标对象的成像尺寸。The size determination unit 30 determines the imaging size of the target object based on the display parameters of the reference object. When the display parameter of the reference object includes the display scale coefficient of the reference object, the size determination unit 30 may determine the imaging size of the target object based on the display scale coefficient of the reference object.

例如,尺寸确定单元30可确定目标对象的实际尺寸,根据参照物的显示比例系数和目标对象的实际尺寸确定目标对象的成像尺寸。例如,目标对象的成像尺寸可为目标对象的实际尺寸与参照物的显示比例系数的商。For example, the size determination unit 30 may determine the actual size of the target object, and determine the imaging size of the target object according to the display scale coefficient of the reference object and the actual size of the target object. For example, the imaging size of the target object may be the quotient of the actual size of the target object and the display scale coefficient of the reference object.

在一个示例中,尺寸确定单元30可根据用户输入来获得目标对象的实际尺寸。In one example, the size determination unit 30 may obtain the actual size of the target object according to the user input.

在另一示例中,尺寸确定单元30基于拍摄所述目标对象时的拍摄参数来获得所述目标对象的实际尺寸。In another example, the size determination unit 30 obtains the actual size of the target object based on the shooting parameters when shooting the target object.

例如,尺寸确定单元30响应于用户的操作,在屏幕显示的拍摄的所述目标对象的图像上标记关于所述目标对象的区域,基于标记的区域所占的像素点的数量确定所述目标对象的与标记的区域相应的部分的实际尺寸。For example, in response to the user's operation, the size determination unit 30 marks an area related to the target object on the captured image of the target object displayed on the screen, and determines the target object based on the number of pixels occupied by the marked area The actual size of the part corresponding to the marked area.

具体地,尺寸确定单元30基于拍摄图像时的像距和物距、标记的区域所占的像素点的数量,以及成像传感器的成像区域的尺寸与屏幕显示拍摄的图像的区域的分辨率之间的对应关系,确定所述目标对象的与标记的区域相应的部分的实际尺寸。Specifically, the size determination unit 30 is based on the image distance and object distance when the image is captured, the number of pixels occupied by the marked area, and the difference between the size of the imaging area of the imaging sensor and the resolution of the area where the captured image is displayed on the screen The corresponding relationship is determined, and the actual size of the part of the target object corresponding to the marked area is determined.

作为示例,标记的区域是预定宽度的线条,尺寸确定单元30可基于拍摄图像时的像距和物距、所述预定宽度的线条所占的像素点的数量、所述预定宽度所对应的像素点的数量、以及成像传感器的成像区域的长度与屏幕显示拍摄的图像的区域的一列像素点的数量之间的比例关系,计算所述目标对象的与标记的线条相应的部分的实际尺寸。As an example, the marked area is a line with a predetermined width, and the size determination unit 30 may be based on the image distance and the object distance when the image is captured, the number of pixels occupied by the line with the predetermined width, and the pixels corresponding to the predetermined width. The actual size of the portion of the target object corresponding to the marked line is calculated from the number of dots, and the proportional relationship between the length of the imaging area of the imaging sensor and the number of pixels in a column of the area where the captured image is displayed on the screen.

显示单元40在所述参照物的图像上按照所述目标对象的成像尺寸显示所述目标对象的图像。显示单元40还可输出目标对象和参照物的合成效果图像,以供用户进行参考。The display unit 40 displays the image of the target object on the image of the reference object according to the imaging size of the target object. The display unit 40 may also output a composite effect image of the target object and the reference object for the user's reference.

根据本发明的示例性实施例还提供一种计算装置。该计算装置包括处理器和存储器。存储器用于存储程序指令。所述程序指令被处理器执行使得处理器执行如上所述的图像显示方法的程序指令。A computing device is also provided according to an exemplary embodiment of the present invention. The computing device includes a processor and memory. Memory is used to store program instructions. The program instructions are executed by the processor to cause the processor to execute the program instructions of the image display method as described above.

根据本发明的示例性实施例还提供一种计算机可读存储介质。该计算机可读存储介质存储有当被处理器执行时使得处理器执行上述图像显示方法的程序指令。该计算机可读记录介质是可存储由计算机系统读出的数据的任意数据存储装置。计算机可读记录介质的示例包括:只读存储器、随机存取存储器、只读光盘、磁带、软盘、光数据存储装置和载波(诸如经有线或无线传输路径通过互联网的数据传输)。计算机可读记录介质也可分布于连接网络的计算机系统,从而计算机可读代码以分布式存储和执行。此外,完成本发明的功能程序、代码和代码段可容易地被与本发明相关的领域的普通程序员在本发明的范围之内解释。Exemplary embodiments according to the present invention also provide a computer-readable storage medium. The computer-readable storage medium stores program instructions that, when executed by the processor, cause the processor to perform the above-described image display method. The computer-readable recording medium is any data storage device that can store data read by a computer system. Examples of the computer-readable recording medium include read-only memory, random-access memory, optical disks, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the Internet via wired or wireless transmission paths). The computer-readable recording medium can also be distributed over network coupled computer systems so that the computer-readable code is stored and executed in a distributed fashion. In addition, functional programs, codes and code segments for accomplishing the present invention can be easily construed by programmers of ordinary skill in the art to which the present invention pertains within the scope of the present invention.

采用本发明示例性实施例的所述图像显示方法和设备,能够实现不同虚拟物体在同一空间中的智能搭配,以向用户呈现虚拟物体在现实中的搭配效果图。Using the image display method and device according to the exemplary embodiments of the present invention can realize the intelligent collocation of different virtual objects in the same space, so as to present the collocation effect diagram of the virtual objects in reality to the user.

此外,采用根据本发明示例性实施例的所述图像显示方法和设备,利用拍照时生成的一系列参数,实现对所拍照实物或虚拟图片中物品的优化缩放,使得实物图片的智能搭配。In addition, using the image display method and device according to the exemplary embodiment of the present invention, a series of parameters generated when taking pictures are used to realize the optimal zooming of the objects in the photographed real or virtual pictures, so that the real pictures can be intelligently matched.

此外,根据本发明示例性实施例的图像显示方法可以被实现为计算机可读记录介质中的计算机代码。本领域技术人员可以根据对上述方法的描述来实现所述计算机代码。当所述计算机代码在计算机中被执行时实现本发明的上述方法。Also, the image display method according to the exemplary embodiment of the present invention can be implemented as computer codes in a computer-readable recording medium. Those skilled in the art can implement the computer code according to the description of the above method. The above-described method of the present invention is implemented when the computer code is executed in a computer.

尽管已经参照其示例性实施例具体显示和描述了本发明,但是本领域的技术人员应该理解,在不脱离权利要求所限定的本发明的精神和范围的情况下,可以对其进行形式和细节上的各种改变。Although the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that form and detail may be made therein without departing from the spirit and scope of the invention as defined in the claims various changes on.

Claims (14)

1. a kind of image display method, described image display methods include:
It shows the image of object of reference, and extracts the display parameters of the object of reference;
Obtain the image of target object;
The imaging size of the target object is determined based on the display parameters of the object of reference;
The image of the target object is shown according to the imaging size of the target object on the image of the object of reference.
2. image display method as described in claim 1, wherein the display parameters of the object of reference include the object of reference Display scale coefficient, the display scale coefficient indicate the actual size of the object of reference and the imaging size of the object of reference Ratio.
3. image display method as claimed in claim 2, wherein described in the display scale coefficient determination based on the object of reference The step of imaging size of target object includes:
Determine the actual size of the target object;
According to the actual size of the display scale coefficient of the object of reference and the target object determine the target object at As size.
4. image display method as claimed in claim 3, wherein the imaging size of the target object is the target object Actual size and the object of reference display scale coefficient quotient.
5. image display method as claimed in claim 3, wherein the step of determining the actual size of target object packet It includes:
By shooting the image of the target object, the target object is obtained based on the acquisition parameters of the target object Actual size;Or
The actual size of the target object is obtained according to user's input.
6. image display method as claimed in claim 5, wherein by shooting the image of the target object, based on described The step of actual size of the acquisition parameters of target object to obtain the target object includes:
Show the image of the target object of shooting;
In response to the operation of user, region of the label about the target object on the image for the shooting that screen is shown;
The quantity of pixel shared by region based on label determines the part corresponding with the region of label of the target object Actual size.
7. image display method as claimed in claim 6, wherein the quantity of pixel shared by the region based on label determines The step of actual size of the part corresponding with the region of label of the target object includes:
Image distance and object distance when based on shooting image, the quantity and imaging sensor of pixel shared by the region of label Corresponding relationship between the resolution ratio in the region of the image of size and screen the display shooting of imaging region, determines the target pair The actual size of the part corresponding with the region of label of elephant.
8. image display method as claimed in claim 7, wherein the region of label is the lines of preset width,
Wherein, the quantity of pixel shared by the region based on label determines the corresponding with the region of label of the target object The step of partial actual size includes:
It is image distance and object distance when based on shooting image, the quantity of pixel shared by the lines of the preset width, described predetermined The image of length and screen the display shooting of the imaging region of the quantity and imaging sensor of pixel corresponding to width Proportionate relationship between the quantity of the one column pixel in region calculates the part corresponding with the lines of label of the target object Actual size.
9. image display method as described in claim 1, wherein the display parameters of the object of reference further include the object of reference Angles of display, the angles of display indicates actual photographed angle when shooting the image of the object of reference,
Wherein, the step of obtaining the image of target object include:
Determine the angles of display of the target object;
Using the angles of display of the object of reference as reference, the angles of display of the target object and the display of the object of reference are chosen Image of the image that angle matches as the target object.
10. image display method as claimed in claim 9, wherein the step of determining the angles of display of target object packet It includes:
Center of circle arc label corresponding to the measured angle of the target object is denoted as pre- fixed width on the image for the shooting that screen is shown Degree the first lines, and by radius corresponding with the center of circle arc be labeled as preset width the second lines,
Proportionate relationship between the quantity of pixel shared by quantity and the second lines based on pixel shared by the first lines, Determine angles of display of the actual angle of the target object measured angle as the target object.
11. image display method as described in claim 1, wherein obtained by being shot to the object of reference described The display parameters of the image of object of reference and the object of reference.
12. a kind of image display, described image shows that equipment includes:
Display unit shows the image of object of reference;
Parameter extraction unit extracts the display parameters of the object of reference;
Image acquisition unit obtains the image of target object;
Size determination unit determines the imaging size of the target object based on the display parameters of the object of reference,
Wherein, display unit shows the target pair according to the imaging size of the target object on the image of the object of reference The image of elephant.
13. a kind of computing device, comprising:
Processor;
Memory is executed by processor for storing to work as so that processor is executed such as any one institute in claim 1 to 11 The program instruction for the image display method stated.
14. a kind of computer readable storage medium is stored with and processor is made to execute such as claim when being executed by a processor The program instruction of image display method described in any one in 1-11.
CN201710605910.6A 2017-07-24 2017-07-24 Image display method and device Withdrawn CN109299484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710605910.6A CN109299484A (en) 2017-07-24 2017-07-24 Image display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710605910.6A CN109299484A (en) 2017-07-24 2017-07-24 Image display method and device

Publications (1)

Publication Number Publication Date
CN109299484A true CN109299484A (en) 2019-02-01

Family

ID=65167523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710605910.6A Withdrawn CN109299484A (en) 2017-07-24 2017-07-24 Image display method and device

Country Status (1)

Country Link
CN (1) CN109299484A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837522A (en) * 2019-11-11 2020-02-25 广州千睿信息科技有限公司 To-be-purchased product display method and display platform based on big data analysis
CN112734231A (en) * 2021-01-09 2021-04-30 深圳市瑞驰文体发展有限公司 Billiard event management platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837522A (en) * 2019-11-11 2020-02-25 广州千睿信息科技有限公司 To-be-purchased product display method and display platform based on big data analysis
CN110837522B (en) * 2019-11-11 2020-09-22 广州玖富网络科技有限公司 To-be-purchased product display method and display platform based on big data analysis
CN112734231A (en) * 2021-01-09 2021-04-30 深圳市瑞驰文体发展有限公司 Billiard event management platform
CN112734231B (en) * 2021-01-09 2021-08-24 深圳市瑞驰文体发展有限公司 Billiard event management platform

Similar Documents

Publication Publication Date Title
US9214137B2 (en) Methods and systems for realistic rendering of digital objects in augmented reality
CN110458865B (en) In situ formation of planar natural feature targets
CN104781849B (en) Monocular vision positions the fast initialization with building figure (SLAM) simultaneously
CN105320695B (en) Picture processing method and device
WO2021136386A1 (en) Data processing method, terminal, and server
JP2020509506A (en) Method, apparatus, device, and storage medium for determining camera posture information
WO2016155377A1 (en) Picture display method and device
CN109934931B (en) Method and device for collecting image and establishing target object recognition model
JP2017531950A (en) Method and apparatus for constructing a shooting template database and providing shooting recommendation information
JP2014071850A (en) Image processing apparatus, terminal device, image processing method, and program
CN107481082A (en) Virtual fitting method and device, electronic equipment and virtual fitting system
CN110177216A (en) Image processing method, image processing device, mobile terminal and storage medium
US11604904B2 (en) Method and system for space design
CN117930978A (en) AR interaction method, system, equipment and storage medium for museum cultural relics
WO2016184285A1 (en) Article image processing method, apparatus and system
CN110765926B (en) Picture book identification method, device, electronic equipment and storage medium
CN109299484A (en) Image display method and device
WO2025082380A1 (en) Video generation
CN107707816A (en) A kind of image pickup method, device, terminal and storage medium
WO2018000299A1 (en) Method for assisting acquisition of picture by device
CN108182228A (en) User social contact method, device and the computing device realized using augmented reality
CN105786166B (en) Augmented reality method and system
CN109840948B (en) Method and device for delivering target objects based on augmented reality
CN111242734A (en) Commodity display method, server, terminal, system, electronic equipment and storage medium
WO2024087927A1 (en) Pose determination method and apparatus, and computer-readable 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190201