Photographing point position determination method and device, storage medium and electronic device
Patent Information
- Application Number
- CN202210126429.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-02-10
AI Technical Summary
然而,相关技术中的点位确定方法,存在点位确定不合理的问题,进而降低了用户使用体验
[0015] Fourthly, this disclosure provides an electronic device, comprising:
Smart Images

Figure CN116644536B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining photographic locations. Background Technology
[0002] In smart home scenarios, it's necessary to select suitable camera locations for the downstream 3D rendering module to perform rendering, allowing users to experience a 3D rendering of the entire home's smart design from these chosen locations. However, the methods used to determine these locations in related technologies suffer from issues of unreasonable location selection, thus reducing the user experience. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] Firstly, this disclosure provides a method for determining the location of a photograph, including:
[0005] Acquire target data, which includes vectorized data corresponding to multiple rooms;
[0006] Based on the candidate point selection rules and the target data, the candidate point locations corresponding to each room are determined, and based on the point number determination rules and the target data, the target point number corresponding to each room is determined.
[0007] Based on the number of candidate points and the number of target points corresponding to each room, the room type corresponding to each room is determined;
[0008] Based on the rules for determining target photo locations corresponding to each room type, the target photo locations corresponding to each room are determined.
[0009] Secondly, this disclosure provides a device for determining the location of a photograph, comprising:
[0010] The target data acquisition module is used to acquire target data, which includes vectorized data corresponding to multiple rooms;
[0011] The candidate point determination module is used to determine the candidate points corresponding to each room based on the candidate point selection rules and the target data, and to determine the target number of points corresponding to each room based on the point number determination rules and the target data.
[0012] The room type determination module is used to determine the room type corresponding to each room based on the number of candidate points and the number of target points corresponding to each room.
[0013] The target photo location determination module is used to determine the target photo location for each room based on the target photo location determination rules corresponding to each room type.
[0014] Thirdly, this disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in the first aspect.
[0015] Fourthly, this disclosure provides an electronic device, comprising:
[0016] A storage device on which computer programs are stored;
[0017] A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0018] Based on the above technical solution, since the number of target photo points in each room is determined in advance, the number of target photo points is controllable, which can reduce the generation of redundant points and improve the user experience. In addition, since the type of each room is determined first, and then the target photo points in each room are determined according to the target photo point determination rules corresponding to the room type, the characteristics of the number of points in each room can be taken into account to determine the target photo points in a targeted manner. Compared with using the same method to determine the target photo points for all rooms, the rationality of the determination of target photo points can be improved, further enhancing the user experience.
[0019] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0021] Figure 1 This is a flowchart illustrating a method for determining a photo capture location according to an exemplary embodiment.
[0022] Figure 2 This is a flowchart illustrating another method for determining camera locations according to an exemplary embodiment;
[0023] Figure 3This is a schematic diagram of a process for determining candidate locations according to an exemplary embodiment;
[0024] Figure 4 This is a schematic diagram of candidate locations in a room according to an exemplary embodiment;
[0025] Figure 5 This is a flowchart illustrating the process of determining the number of target points according to another exemplary embodiment;
[0026] Figure 6 This is a stereoscopic effect diagram of a photographed image provided according to another exemplary embodiment;
[0027] Figure 7 This is a schematic diagram of a target connection relationship provided according to another exemplary embodiment;
[0028] Figure 8 This is a schematic diagram of the module connection of a camera location determination device according to an exemplary embodiment;
[0029] Figure 9 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation
[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0031] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0032] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.
[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0035] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0036] In related technologies, it is common practice to set up a camera at regular intervals in the room, and additional camera points will be added near the door and in the center of the room.
[0037] The methods described above have some limitations. For example, they can lead to an uncontrollable number of photo points, resulting in many redundant points. When generating 3D renderings using the target photo points, the user experience of jumping from one room to another is poor. At the same time, the redundancy of points also increases the processing time from providing home decoration data to displaying the final 3D rendering, increasing the user's waiting time and further reducing the user experience.
[0038] To address the aforementioned technical problems, this disclosure provides a method, apparatus, storage medium, and electronic device for determining camera locations. By pre-determining the number of target camera locations in each room, the number of target camera locations is controllable, reducing redundant locations and improving user experience. By first determining the type of each room and then determining the target camera locations for each room according to the target camera location determination rules corresponding to the room type, the characteristics of the number of camera locations in each room can be taken into account to determine the target camera locations specifically. Compared to using the same method to determine the target camera locations for all rooms, this improves the rationality of the target camera location determination and further enhances the user experience.
[0039] The following will describe in detail, with reference to the accompanying drawings, a method, apparatus, storage medium, and electronic device for determining photographic locations according to embodiments of this disclosure.
[0040] Figure 1 This is a flowchart illustrating a method for determining a photographing location according to an exemplary embodiment. The method for determining a photographing location provided in this disclosure can be executed by an electronic device, specifically by a photographing location determining device. This device can be implemented in software and / or hardware and configured within the electronic device. Please refer to... Figure 1 The method for determining the location of a photograph provided in this embodiment may include the following steps:
[0041] S110, acquire target data, which includes vectorized data corresponding to multiple rooms.
[0042] The target data can be data subsequently used to determine the location of the photograph, such as interior decoration data for a particular residence. In some implementations, the target data can be data actively input by the user or uploaded to an electronic device.
[0043] The target data is vectorized data. In some cases, the room is unfurnished, so the target data can be vectorized data that only includes the room layout. In other cases, the room is furnished, so the target data can be vectorized data that includes both the room layout and the furniture layout. Furthermore, home decoration data can include multiple rooms, each with its own vectorized data.
[0044] S120: Based on the candidate point selection rules and target data, determine the candidate point locations corresponding to each room, and based on the point number determination rules and target data, determine the target point number corresponding to each room.
[0045] The candidate location selection rule is used to determine the candidate locations for each room based on the target data. Candidate locations refer to pre-selected locations used to filter and determine the final target photography locations.
[0046] It should be noted that there may be one or more candidate points, or none at all.
[0047] The target number determination rule is used to determine the target number of cameras for each room based on the target data. Specifically, the target number of cameras refers to the final number of target camera locations determined for each room.
[0048] Therefore, in this embodiment of the present disclosure, after the electronic device acquires the target photo location, it can determine the candidate locations corresponding to each room based on the candidate point selection rules and target data. In addition, it can also determine the target number of locations corresponding to each room based on the number of locations determination rules and target data.
[0049] S130, based on the number of candidate points and the number of target points corresponding to each room, determine the room type corresponding to each room.
[0050] Understandably, after determining the candidate points for each room, the number of candidate points for each room can be obtained. At this point, the number of candidate points and the number of target points for each room can be compared to determine the room type for each room.
[0051] S140, based on the target photo location determination rules corresponding to each room type, determine the target photo location corresponding to each room.
[0052] In this embodiment of the disclosure, different target location determination rules can be pre-set for different room types. Therefore, after determining the room type for each room, the target photography locations for each room can be determined according to the corresponding target location determination rules.
[0053] Using the above method, after acquiring the target data, candidate points for each room are first determined based on the candidate point selection rules and the target data. Then, the target number of points for each room is determined based on the point number determination rules and the target data. Next, the room type for each room is determined based on the number of candidate points and the target number of points for each room. Finally, the target photo points for each room are determined based on the target photo point determination rules corresponding to each room type. Since the number of target photo points for each room is predetermined, the number of target photo points is controllable, reducing redundant points and improving user experience. Furthermore, because the room type is determined first, and then the target photo points for each room are determined according to the target photo point determination rules corresponding to the room type, the characteristics of the number of points in each room can be taken into account to determine the target photo points specifically. Compared to using the same method to determine target photo points for all rooms, this improves the rationality of the target photo point determination and further enhances the user experience.
[0054] Figure 2 This is a flowchart illustrating a method for determining a photographing location according to an exemplary embodiment. The method for determining a photographing location provided in this disclosure can be executed by an electronic device, specifically by a photographing location determining device. This device can be implemented in software and / or hardware and configured within the electronic device. Please refer to... Figure 2 The method for determining the location of a photograph provided in this embodiment may include the following steps:
[0055] S210, acquire target data, which includes vectorized data corresponding to multiple rooms.
[0056] For a detailed description of step S210, please refer to the content of step S110 above, which will not be repeated here.
[0057] S220: Based on the candidate point selection rules and target data, determine the candidate point locations corresponding to each room, and based on the point number determination rules and target data, determine the target point number corresponding to each room.
[0058] In some implementations, such as Figure 3 As shown, based on the candidate point selection rules and target data, the candidate point locations for each room are determined, including the following steps:
[0059] S221, Based on the candidate point selection interval and the candidate point reference point, candidate points are selected in the target area of each room to obtain the original points corresponding to each room.
[0060] Among them, the candidate reference point can be any point in the target area of the room, such as the center point of the room in real time, the edge point of the wall or furniture, etc.
[0061] The target area can be understood as the area within the room where photo-taking locations can be selected.
[0062] It is understandable that the shape of the room, the placement and height of the furniture, etc., can all affect the location for taking photos. Under normal circumstances, the selection of a photo location should meet certain basic conditions. For example, it should be possible to take a photo from this location, and the field of view of the photo taken from this location should conform to the field of view of a normal human eye.
[0063] For example, wardrobes are installed at a high height. Although there is still space between them and the ceiling, if a photo spot is selected in this space, it is not convenient to take a normal photo because it is too high. Furthermore, the field of view obtained from such a high place does not conform to the field of view that a normal person's eyes can see. Therefore, this place is usually not selected. In other words, this area cannot be selected as the target area.
[0064] Therefore, if a location in a certain area does not meet the basic conditions for selecting a photo location, that area cannot be selected as the target area. Thus, the method in this embodiment may further include a step of determining a target area. In some implementations, determining the target area may include the following steps: based on the vectorized data corresponding to each room, determining the original building layout information and the layout information of the placed items in each room, the layout information including location information and size information; based on the original building layout information and the layout information of the placed items in each room, determining the target area for the corresponding room, the target area representing the area where photo locations can be selected.
[0065] In some implementations, vectorized data can be understood as data that records dimensions such as length, width, and height, as well as object categories. Therefore, based on the vectorized data corresponding to each room, the location and size information of the original buildings (e.g., walls, windows, etc.) in the room can be obtained, as well as the location and size information of the items placed there (e.g., beds, sofas, chandeliers, coffee tables, etc.).
[0066] Next, based on the original building layout information and the layout information of the items placed in each room, as well as the basic conditions for selecting photo spots mentioned above, the target area in the corresponding room where photo spots can be selected can be determined.
[0067] In this embodiment of the disclosure, after determining the target area corresponding to each room, the interval can be selected according to the candidate point location. Taking the candidate point location reference point as the center, the original point location corresponding to each room can be selected around the candidate point location reference point in the target area of each room.
[0068] In some implementations, the candidate point selection interval can be, for example, 30cm, which is close to the human step length, making it more in line with the point selection needs in the scene.
[0069] S222, obtain the distance between the original point corresponding to each room and the preset object in the corresponding room.
[0070] The preset object can be understood as an object that affects the photo taking point, such as a wall or furniture.
[0071] Therefore, after obtaining the original points corresponding to each room, in order to prevent the selected original points from being too close to furniture or walls and reducing the user experience, we can further obtain the distance between the original points corresponding to each room and the preset objects in each room.
[0072] S223, the original points whose distance meets the preset distance threshold are determined as the candidate points corresponding to the corresponding rooms.
[0073] In this embodiment of the disclosure, after obtaining the distance between the original points corresponding to each room and the preset objects in the corresponding rooms, the candidate points corresponding to the corresponding rooms can be further determined from the original points whose distances meet the preset distance threshold.
[0074] For example, for the first room, the distance between the selected original point in the first room and each preset object in the first room can be obtained. Then, original points with a distance greater than or equal to the preset distance are selected from the first room and determined as candidate points corresponding to the first room. For the second room, the distance between the selected original point in the second room and each preset object in the second room can be obtained. Then, original points with a distance greater than or equal to the preset distance are selected from the second room and determined as candidate points corresponding to the second room. When there are other rooms, the same principle applies.
[0075] In addition, in some cases, considering that some rooms are relatively small, there may be no original point, and therefore no candidate point can be determined. Or there may be an original point, but the distance between the original point and the preset object in the room does not meet the preset distance, thus making it impossible for the room to have a candidate point.
[0076] In addition, in some implementations, after obtaining the original points corresponding to each room, the original points corresponding to each room can be directly determined as candidate points corresponding to each room.
[0077] Please see Figure 4 , Figure 4 A schematic diagram of the candidate locations in each room is shown. The candidate locations are as follows: Figure 4 As shown by the center dot.
[0078] In some implementations, such as Figure 5 As shown, based on the point number determination rules and target data, the target number of points for each room is determined, including the following steps:
[0079] S224, Based on the target data, determine the target shape corresponding to each room.
[0080] As can be seen from the foregoing, vectorized data can be understood as data that records dimensions such as length, width, and height, as well as object categories. In this case, in this embodiment of the present disclosure, the outline of each room can be approximated based on the target data, that is, the target outline of each room.
[0081] In some implementations, the target shape can be a triangle, quadrilateral, pentagon, or other polygons.
[0082] S225, based on the correspondence between the shape and the number of points, determine the first number of points corresponding to each target shape.
[0083] In this embodiment of the disclosure, the correspondence between the shape and the point data can be preset, so that after determining the target shape corresponding to each room, the first number of points corresponding to each room can be found.
[0084] For example, a triangular room corresponds to a first point number of 2, a quadrilateral room corresponds to a first point number of 3, and so on.
[0085] S226, based on the point addition rules, determines the second point number to be added for each room.
[0086] Understandably, the first number of points only considers the outline of the room. Therefore, in order to further improve the accuracy of the target number of points, some additional point rules can be considered to continue to determine the second number of points to be added for each room.
[0087] In some implementations, the point addition rules include one or more of the following: a first point addition rule based on the room's area size, a second point addition rule based on the room's preset number of building objects, and a third point addition rule based on the room's preset building structure.
[0088] The preset building objects can be objects such as windows or room doors. The preset building structure can be a protruding shape.
[0089] For example, add one second-digit number when the area of a room is greater than 13 square meters, add one second-digit number when a room has more than 3 doors, and add one second-digit number when the room has protruding walls.
[0090] S227, the sum of the first and second point values of each room is used as the target point value of the corresponding room.
[0091] In this embodiment of the disclosure, after determining the first number of points corresponding to each target shape and the second number of points to be added, the first number of points and the second number of points can be added together to obtain the target number of points in the room.
[0092] By setting rules for adding points, the determined target number of points can take into account room information other than the room's outline, thus improving the accuracy of the determined target number of points.
[0093] S230, based on the number of candidate points and the number of target points corresponding to each room, determine the room type corresponding to each room.
[0094] Based on the foregoing, by comparing the number of candidate points and the number of target points for each room, the room type corresponding to each room can be determined.
[0095] In some implementations, comparing the number of candidate points and the number of target points for each room can yield three results: the number of candidate points for the room is greater than the number of target points, the number of candidate points for the room is less than or equal to the number of target points, and the room has no candidate points.
[0096] In this case, room types can be divided into three categories. Specifically, room types include the first type (rooms with more candidate points than target points), the second type (rooms with fewer or equal candidate points than target points), and the third type (rooms with no candidate points).
[0097] S240, based on the target photo location determination rules corresponding to each room type, determines the target photo location corresponding to each room.
[0098] Based on the foregoing, we know that there are three types of rooms: Type 1, Type 2, and Type 3. Therefore, there can be different methods for determining the target photo locations for different room types.
[0099] In some implementations, when the room type is the second type, the candidate point corresponding to the second type room can be determined as the target photo point corresponding to the second type room.
[0100] In this embodiment of the disclosure, since the number of candidate points in the second type of room is less than or equal to the number of target points, there is no need to filter the candidate points, so the candidate points can be directly determined as target photography points.
[0101] In some implementations, when the room type is the third type, the center point of the third type room can be determined as the target photo point corresponding to the third type room.
[0102] In this embodiment of the disclosure, since there are no candidate locations in the third type of room, the center location of the third type of room can be directly determined as the target photography location.
[0103] In some implementations, when the room type is the first type, a genetic algorithm can be used to iteratively search for candidate points corresponding to the first type of room to obtain the target photography points corresponding to the first type of room. The number of target photography points for the same first type of room is the same as the number of target points.
[0104] Genetic Algorithm (GA), also known as Genetic Algorithm, is an algorithm designed based on the evolutionary laws of organisms in nature. It's a computational model that simulates the biological evolutionary process based on Darwin's theory of evolution, specifically natural selection and genetic mechanisms. It's a method for searching for optimal solutions by simulating natural evolution. Through mathematical calculations and computer simulations, the algorithm transforms the problem-solving process into processes similar to the selection, crossover, and mutation of chromosomes and genes in biological evolution. When solving complex combinatorial optimization problems, GA typically achieves better optimization results faster than some other conventional optimization algorithms.
[0105] Since genetic algorithms can quickly obtain good optimization results, they can be applied to scenarios with certain real-time requirements, such as the scenario of determining the photo shooting location disclosed in this invention, so as to reduce the processing time from providing home decoration data to displaying the final 3D rendering, reduce user waiting time, and improve user experience.
[0106] The main characteristic of genetic algorithms is that they operate directly on structural objects (i.e., gene-encoded sequences), without the constraints of differentiation and function continuity, possessing inherent implicit parallelism and better global optimization capabilities. They employ probabilistic optimization methods, automatically acquiring and guiding the search space without the need for deterministic rules, and adaptively adjusting the search direction. Genetic algorithms treat all individuals in a population as objects and utilize randomization techniques to guide an efficient search of an encoded parameter space. Selection, crossover, and mutation constitute the genetic operations of genetic algorithms. The core content of genetic algorithms consists of five elements: parameter encoding, initial population setting, fitness function (condition) design, genetic operation design, and control parameter setting.
[0107] Since the selection of target photo locations in the scenario where multiple first-type rooms exist may affect each other when there are multiple first-type rooms, in order to improve the accuracy of the final determined target photo locations, a genetic algorithm is used to determine the target photo locations corresponding to the first-type rooms. This algorithm can take into account the correlation between the determined target photo locations in each room and thus find the globally optimal target photo locations.
[0108] Broadly speaking, a genetic algorithm includes the following steps: First, design encoding rules and encode individual genes according to these rules to obtain an initial population. Second, design a fitness function, also known as a fitness condition, and evaluate the fitness of each individual in the initial population based on the fitness function. Third, based on the fitness of each individual, select target individuals for crossover. Fourth, mutate the crossover individuals to obtain the first generation population. Fifth, evaluate the fitness of each individual in the first generation population according to the fitness function, and repeat this process until the Nth generation population is obtained. The core idea of the genetic algorithm for searching for the optimal solution is that the last generation population is the best among all generations, therefore, the last generation population contains the optimal individual.
[0109] In some implementations, iteratively searching candidate points corresponding to a first type of room using a genetic algorithm to obtain target photography points for the first type of room may include the following steps: generating multiple point allocation information to obtain an initial set of point allocation information for the genetic algorithm, each point allocation information including the target allocation points determined in each room, the target allocation points corresponding to the first type of room being determined from the candidate points corresponding to the first type of room, and the target allocation points corresponding to the second and third types of rooms being the target photography points; iteratively searching the candidate points corresponding to the first type of room based on the initial set of point allocation information and preset fitness conditions to obtain the target photography points corresponding to the first type of room; wherein the target photography points corresponding to the second and third types of rooms remain fixed during the iterative search process.
[0110] In this embodiment of the disclosure, a point allocation information can be understood as an individual in a genetic algorithm population. This individual includes multiple gene segments, each gene segment corresponds to a room, and the genes in each gene segment are obtained by encoding the target allocation point determined in the corresponding room. The number of genes in each gene segment is the same as the number of target allocation points in the corresponding room.
[0111] In this context, the target allocation point can be understood as the point in each room selected to encode the gene fragment corresponding to the current individual when creating an individual.
[0112] In this embodiment, since the target imaging locations corresponding to the second type of room and the third type of room are determined, the gene fragments corresponding to the second type of room and the third type of room are also fixed. That is, the gene fragments corresponding to the second type of room and the third type of room can be directly encoded by encoding the target imaging locations. Therefore, the target allocation locations corresponding to the second type of room and the third type of room are the target imaging locations.
[0113] For the first type of room, it is necessary to determine the target allocation point corresponding to each first type of room from the candidate points corresponding to each first type of room.
[0114] As one implementation method, the target allocation points corresponding to each type of room can be determined by random selection.
[0115] After determining the target allocation points for each type of room, the target allocation points for the second and third types of rooms can be combined and encoded to obtain the point allocation information for an individual. By repeating the above process multiple times, multiple sets of point allocation information can be obtained, which constitute multiple individuals in the initial population of the genetic algorithm.
[0116] The following example illustrates the process of obtaining location allocation information in an embodiment of this disclosure.
[0117] Suppose there are four rooms: A, B, C, and D. Rooms A and B are type 1 rooms, room C is type 2 rooms, and room D is type 3 rooms. Room A has two target image acquisition points, room B has three, room C has two, and room D has one. In this case, two candidate images can be randomly selected from the candidate images for room A as target acquisition points. These are then encoded to obtain gene fragment 'a' for room A. Three candidate points are randomly selected from the candidate points corresponding to room B as target allocation points and encoded to obtain gene fragment b corresponding to room B. Two target photography points (two candidate points) in room C are directly used as target allocation points and encoded to obtain gene fragment c corresponding to room C. One target photography point (the center point of room D) is directly used as the target allocation point and encoded to obtain gene fragment d corresponding to room D. Thus, the point allocation information consists of encoded gene fragments a, b, c, and d.
[0118] Furthermore, to accelerate the iteration of the genetic algorithm, as another implementation method, besides randomly selecting all target allocation points for each first type of room, clustering can also be used to determine one point allocation information from multiple point allocation information sets. That is, the method in this embodiment may further include the steps of: using the number of target points for each first type of room as the number of cluster centers, clustering the candidate points for each first type of room to obtain clustering result points for each first type of room; and using the clustering result points for each first type of room as a target allocation point for a first type of room in a point allocation information set.
[0119] In some implementations, clustering can be performed using algorithms such as K-Means algorithm and mean shift clustering algorithm.
[0120] Using the previous example, suppose clustering room A yields two cluster centers. These two cluster centers can be identified as target allocation points for room A and encoded to obtain gene fragment a. Clustering room B yields three cluster centers. These three cluster centers can be identified as target allocation points for room B and encoded to obtain gene fragment b. Then, by combining the two target photography points (two candidate points) of room C with the encoded gene fragment c for room C, and the one target photography point (room center point) of room D with the encoded gene fragment d for room D, we can obtain the allocation information for another point, i.e., another individual.
[0121] In this embodiment of the disclosure, by clustering the candidate points corresponding to each first type of room, the target allocation points determined in the same first type of room can be far apart. This can provide a better iterative direction for the genetic algorithm when iterating on multiple point allocation information sets, thereby achieving the purpose of accelerating the iteration of the genetic algorithm.
[0122] In this embodiment of the disclosure, after obtaining the initial point allocation information set as a genetic algorithm, the candidate points corresponding to the first type of room can be iteratively searched based on the initial point allocation information set and the preset fitness conditions to obtain the target photography points corresponding to the first type of room.
[0123] In some implementations, fitness conditions may include one or more of the following: a first fitness condition based on the distance between each target allocation point in the same first and second type of room; a second fitness condition based on the visibility between each target allocation point and other target allocation points; a third fitness condition based on the coverage of each target allocation point to the corresponding room; and a fourth fitness condition based on the connectivity visibility between each target allocation point.
[0124] In some implementations, a genetic termination condition can be set. Optionally, the genetic termination condition can be that the number of iterations meets a preset number, or that the fitness score of the population no longer improves after multiple iterations (e.g., 5 times).
[0125] After determining the termination of the genetic algorithm based on the genetic termination condition, the target point allocation information with the highest fitness condition score can be selected, and the target point allocation information can be decoded to obtain the target photo point corresponding to the first type of room.
[0126] In some embodiments, during the execution of the genetic algorithm, the selection probability Ps can be set to 0.2, the crossover probability Pc can be set to 0.6, and the mutation probability Pm can be set to 0.001.
[0127] It should be noted that, in this embodiment of the disclosure, considering that the target photography points of the second type of room and the third type of room will not change, but will still affect the selection of target photography points of other first type of rooms, after encoding the target allocation points corresponding to the second type of room and the third type of room into gene fragments, the gene fragments corresponding to the second type of room and the third type of room are kept unchanged during the genetic algorithm iteration process.
[0128] It should be noted that the room type of each room in a target dataset can be any of the above types, depending on the actual target data. For example, if the target data includes 3 rooms, the first room can be any of the 3 room types, the second room can also be any of the 3 room types, and the third room can also be any of the 3 room types.
[0129] S250 connects each target shooting point to obtain the original connection relationship. The point connection relationship represents the jump path between shooting points.
[0130] The jump path between photo points refers to the ability to jump from the current point to other points with connection relationships in the generated 3D effect image by clicking the jump control, thereby displaying the photo images corresponding to those other points.
[0131] Please refer to Figure 6 This displays a 3D effect of a photographed image at a specific location. By clicking the bathroom jump control, users can jump from the current location to the corresponding bathroom location, where the photographed image of that bathroom location will be displayed.
[0132] S260, based on preset connection relationship filtering rules, determines the target connection relationship from the original connection relationship.
[0133] In this embodiment of the disclosure, considering that when connecting various target photo points, the original connection relationship may include two points that span a large distance or span multiple rooms, such point connection relationship may also affect the user experience when used for actual navigation. Therefore, the connection relationship filtering rule can be a filtering rule based on the distance between the two points included in the connection relationship and the number of rooms spanned.
[0134] After determining the filtering rules for connection relationships, the original connection relationships can be filtered to identify the target connection relationships.
[0135] like Figure 7 As shown, the target connections remain after filtering the original connections. It can be seen that the target connections do not connect all the points in pairs.
[0136] S270, acquire the corresponding photo images of each room at the target photo location.
[0137] S280 generates a 3D rendering of the target data based on the captured image and the target connection relationship.
[0138] In this embodiment of the disclosure, after obtaining the target connection relationship and the photo images of each room corresponding to the target photo location, a stereoscopic effect diagram corresponding to the target data can be generated based on the photo images and the target connection relationship. The stereoscopic effect diagram can show the stereoscopic effect to the user, that is, it can further allow the user to experience the VR stereoscopic effect under the target data.
[0139] Experimental data comparison shows that the photo point determination method of this disclosure embodiment can reduce the number of photo points in the room by 10.7% compared with the photo point determination method in related technologies. At the same time, it increases the target connection relationship, increases the number of visible edges by 21.9%, increases the average number of visible points per photo point, and eliminates disconnected graphs.
[0140] Figure 8 This is a schematic diagram of the module connections of a camera location determination device according to an exemplary embodiment. Figure 8 As shown, this disclosure provides a device for determining the location of a photograph, the device 300 may include:
[0141] The target data acquisition module 310 is used to acquire target data, which includes vectorized data corresponding to multiple rooms.
[0142] The point determination module 320 is used to determine the candidate point corresponding to each room based on the candidate point selection rules and the target data, and to determine the target number of points corresponding to each room based on the point number determination rules and the target data.
[0143] The room type determination module 330 is used to determine the room type corresponding to each room based on the number of candidate points and the number of target points corresponding to each room.
[0144] The target photo location determination module 340 is used to determine the target photo location for each room based on the target photo location determination rules corresponding to each room type.
[0145] Optionally, the room type includes a first type of room where the number of candidate points is greater than the number of target points, a second type of room where the number of candidate points is less than or equal to the number of target points, and a third type of room where there are no candidate points.
[0146] Optionally, the target photo location determination module 340 includes:
[0147] The first determining submodule is used to iteratively search for candidate points corresponding to the first type of room based on a genetic algorithm to obtain target photography points corresponding to the first type of room. The number of target photography points for the same first type of room is the same as the number of target points; or
[0148] The second determining submodule is used to determine the candidate locations corresponding to the second type of room as the target photography locations corresponding to the second type of room; or
[0149] The third determining submodule is used to determine the center point of the third type of room as the target photo point corresponding to the third type of room.
[0150] Optionally, the first determining submodule includes:
[0151] A point allocation information generation unit is used to generate multiple point allocation information sets to obtain an initial point allocation information set for a genetic algorithm. Each point allocation information set includes a target allocation point determined in each room. The target allocation point corresponding to the first type of room is determined from the candidate points corresponding to the first type of room. The target allocation points corresponding to the second type of room and the third type of room are target photography points. The target photography points corresponding to the second type of room and the third type of room remain fixed during the iterative search process.
[0152] The iterative search unit is used to iteratively search for candidate locations corresponding to the first type of room based on the initial location allocation information set and preset fitness conditions, so as to obtain the target photography location corresponding to the first type of room.
[0153] Optionally, the device 300 further includes:
[0154] The clustering module is used to cluster the candidate points corresponding to each first type of room, using the number of target points corresponding to each first type of room as the number of cluster centers, to obtain the clustering result points corresponding to each first type of room.
[0155] The target allocation point determination module is used to take the clustering result points corresponding to each of the first type of rooms as the target allocation points of the first type of rooms in the point allocation information.
[0156] Optionally, the fitness conditions include one or more of the following: a first fitness condition based on the distance between each target allocation point in the same first and second type of room; a second fitness condition based on the visibility between each target allocation point and other target allocation points; a third fitness condition based on the coverage of each target allocation point to the corresponding room; and a fourth fitness condition based on the connectivity visibility between each target allocation point.
[0157] Optionally, the location determination module 320 includes:
[0158] The original point location determination submodule is used to select the candidate points in the target area of each room based on the candidate point selection interval and the candidate point reference point, so as to obtain the original point location corresponding to each room.
[0159] The distance determination submodule is used to obtain the distance between the original point corresponding to each room and the preset object in the corresponding room;
[0160] The candidate point determination submodule is used to determine the original points whose distances meet the preset distance threshold as the candidate points corresponding to the corresponding rooms.
[0161] Optionally, the device 300 further includes:
[0162] The layout information determination module is used to determine the layout information of the original building and the layout information of the items placed in each room based on the vectorized data corresponding to each room. The layout information includes location information and size information.
[0163] The target area determination module is used to determine the target area of the corresponding room based on the original building layout information and the layout information of the placed items in each room. The target area represents the area where the photo taking points can be selected.
[0164] Optionally, the location determination module 320 includes:
[0165] The target shape determination submodule is used to determine the target shape corresponding to each room based on the target data;
[0166] The first point number determination submodule is used to determine the first point number corresponding to each of the target shapes based on the correspondence between the shape and the number of points.
[0167] The second point number determination submodule is used to determine the number of second points to be added for each room based on the point number addition rules;
[0168] The target number of points determination submodule is used to take the sum of the first number of points and the second number of points in each room as the target number of points for the corresponding room.
[0169] Optionally, the point addition rules include one or more of the following: a first point addition rule based on the room's area size, a second point addition rule based on the room's preset number of building objects, and a third point addition rule based on the room's preset building structure.
[0170] Optionally, the device 300 further includes:
[0171] The original connection relationship determination module is used to connect each of the target shooting points to obtain the original connection relationship, wherein the point connection relationship represents the jump path between the shooting points;
[0172] The target connection relationship determination module is used to determine the target connection relationship from the original connection relationship based on the preset connection relationship filtering rules;
[0173] The image acquisition module is used to acquire images of each room corresponding to the target image acquisition point.
[0174] The stereoscopic effect generation module is used to generate a stereoscopic effect corresponding to the target data based on the captured image and the target connection relationship.
[0175] The specific implementation methods of each functional module of the device in the above embodiments have been described in detail in the section on methods, and will not be repeated here.
[0176] The following is for reference. Figure 9 This document illustrates a structural schematic diagram of an electronic device 600 suitable for implementing embodiments of the present disclosure. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0177] like Figure 9As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0178] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0179] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.
[0180] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0181] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0182] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0183] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: obtain the current process priority of the hosted application; adjust the process priority of the target process of the host application corresponding to the hosted application to be consistent with the current process priority, wherein the target process is a process necessary for the host application to create a virtual runtime environment for running the hosted application; wherein there is a dependency relationship between the process priority of the hosted application and the process priority of the target process, the dependency relationship being used to cause the process priority of the target process to change following the change of the process priority of the hosted application.
[0184] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0186] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.
[0187] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0188] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0189] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0190] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0191] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A method for determining a photo location, characterized in that, include: Acquire target data, which includes vectorized data corresponding to multiple rooms; Based on the candidate point selection rules and the target data, the candidate point locations corresponding to each room are determined, and based on the point number determination rules and the target data, the target point number corresponding to each room is determined. Based on the number of candidate points and the number of target points corresponding to each room, the room type corresponding to each room is determined; Based on the target photo location determination rules corresponding to each room type, the target photo location corresponding to each room is determined. The room types include: The number of candidate points is greater than the number of target points corresponding to the first type of room, the number of candidate points is less than or equal to the number of target points corresponding to the second type of room, and there is no candidate point corresponding to the third type of room.
2. The method for determining the location of the photograph according to claim 1, characterized in that, The determination of target photo locations for each room based on the target photo location determination rules corresponding to each type of room includes: Based on a genetic algorithm, the candidate locations corresponding to the first type of room are iteratively searched to obtain the target photography locations corresponding to the first type of room. The number of target photography locations for the same first type of room is the same as the number of target locations; or The candidate locations corresponding to the second type of room are determined as the target photography locations corresponding to the second type of room; or The center point of the third type of room is determined as the target photo point corresponding to the third type of room.
3. The method for determining the location of the photograph according to claim 2, characterized in that, The step of iteratively searching for candidate locations corresponding to the first type of room using a genetic algorithm to obtain target photo locations corresponding to the first type of room includes: Multiple point allocation information is generated to obtain the first generation point allocation information set as a genetic algorithm. Each point allocation information includes the target allocation point determined in each room. The target allocation point corresponding to the first type of room is determined from the candidate point corresponding to the first type of room. The target allocation point corresponding to the second type of room and the third type of room are the target photography point. Based on the initial location allocation information set and the preset fitness conditions, the candidate locations corresponding to the first type of room are iteratively searched to obtain the target photography locations corresponding to the first type of room. The target photo locations corresponding to the second type of room and the third type of room remain fixed during the iterative search process.
4. The method for determining the location of the photograph according to claim 3, characterized in that, The method further includes: Using the number of target points corresponding to each type of room as the number of cluster centers, the candidate points corresponding to each type of room are clustered to obtain the clustering result points corresponding to each type of room. The clustering result points corresponding to each of the first type of rooms are used as target allocation points for the first type of rooms in the point allocation information.
5. The method for determining the location of the photograph according to claim 3, characterized in that, The fitness conditions include one or a combination of the following: a first fitness condition based on the distance between each target allocation point in the same first and second type of room; a second fitness condition based on the visibility between each target allocation point and other target allocation points; a third fitness condition based on the coverage of each target allocation point to the corresponding room; and a fourth fitness condition based on the connectivity visibility between each target allocation point.
6. The method for determining the location of a photograph according to any one of claims 1-5, characterized in that, The process of determining candidate locations for each room based on the candidate point selection rules and the target data includes: Based on the candidate point selection interval and the candidate point reference point, the candidate points are selected in the target area of each room to obtain the original points corresponding to each room. Obtain the distance between the original point corresponding to each room and the preset object in the corresponding room; The original points whose distances meet the preset distance threshold are determined as candidate points for the corresponding rooms.
7. The method for determining the location of a photograph according to claim 6, characterized in that, The method further includes: Based on the vectorized data corresponding to each room, the layout information of the original building and the layout information of the items placed in each room are determined. The layout information includes location information and size information. Based on the original building layout information and the layout information of the placed items in each room, the target area of the corresponding room is determined, and the target area represents the area where the photo taking point can be selected.
8. The method for determining the location of a photograph according to any one of claims 1-5, characterized in that, The determination of the target number of points for each room based on the point number determination rule and the target data includes: Based on the target data, the target shape corresponding to each room is determined; Based on the correspondence between the shape and the number of points, the first number of points corresponding to each of the target shapes is determined; Based on the point addition rules, determine the second point number to be added for each of the rooms; The sum of the first and second point numbers in each room is taken as the target point number for the corresponding room.
9. The method for determining the location of a photograph according to claim 8, characterized in that, The point addition rules include one or more of the following: a first point addition rule based on the room's area size, a second point addition rule based on the room's preset number of building objects, and a third point addition rule based on the room's preset building structure.
10. The method for determining the location of a photograph according to any one of claims 1-5, characterized in that, The method further includes: Connect the various target shooting points to obtain the original connection relationship, which represents the jump path between the shooting points; Based on preset connection relationship filtering rules, target connection relationships are determined from the original connection relationships; Acquire images of each room corresponding to the target image capture point; Based on the captured image and the target connection relationship, a 3D rendering corresponding to the target data is generated.
11. A device for determining the location of a photograph, characterized in that, include: The target data acquisition module is used to acquire target data, which includes vectorized data corresponding to multiple rooms; The candidate point determination module is used to determine the candidate points corresponding to each room based on the candidate point selection rules and the target data, and to determine the target number of points corresponding to each room based on the point number determination rules and the target data. The room type determination module is used to determine the room type corresponding to each room based on the number of candidate points and the number of target points corresponding to each room. The target photo location determination module is used to determine the target photo location for each room based on the target photo location determination rules corresponding to each room type. The room types include: The number of candidate points is greater than the number of target points corresponding to the first type of room; the number of candidate points is less than or equal to the number of target points corresponding to the second type of room; and there are no candidate points corresponding to the third type of room.
12. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processing device, it implements the steps of the method described in any one of claims 1-10.
13. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-10.
Citation Information
Patent Citations
Viewing angle point determination method and device, electronic equipment and storage medium
CN113591313A
Artificial intelligence systems and methods for interior furnishing
US20210365603A1