Spatial indexing method, device and computer equipment of image
By obtaining the spatial coordinates and resolution of the target query point during drone inspections, and utilizing database filtering and view frustum filtering technologies, the field of view of the photos can be accurately located, solving the problem of low photo search accuracy in drone inspections and enabling efficient management and utilization of inspection photos.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU ZHONGKE TUXIN NETWORK TECH CO LTD
- Filing Date
- 2022-10-17
- Publication Date
- 2026-05-01
AI Technical Summary
During drone inspections, existing technologies struggle to accurately locate the field of view and target objects in photos on 3D maps, resulting in low photo search accuracy and hindering effective management and utilization of inspection photos.
By acquiring the spatial coordinates and resolution of the target query point, filtering the shooting buffer using a pre-built database, and combining horizontal and vertical axis filtering of the view frustum, the effective object resolution of the image is calculated, and a set of target images that meet the target resolution is determined.
It has improved the ability to manage inspection results, enhanced the value and effectiveness of machine inspection images, and assisted inspection personnel in conducting detailed inspections and management.
Smart Images

Figure CN115544287B_ABST
Abstract
Description
Spatial indexing methods, apparatus and computer equipment for images Technical Field
[0001] This disclosure relates to the field of image indexing technology, and in particular to a spatial indexing method, apparatus and computer device for images. Background Technology
[0002] During drone inspections, a large number of inspection photos are generated. Each photo captures the corresponding target object being inspected. Managing these numerous photos typically involves categorizing them into computer folders, making it difficult to integrate them with 3D maps and models.
[0003] In existing technologies, only the GPS (Global Positioning System) information within the EXIF (Exchangeable Image File) information of a photo is typically read, i.e., the latitude, longitude, and altitude at the time the photo was taken, and the spatial coordinates at the time of shooting are plotted on a map. This method has the following problems: it only knows the location where the photo was taken, but not the field of view, i.e., it cannot identify the main target of the inspection photo; current photo indexing can only be searched by shooting location, resulting in low search accuracy. For example, in a 3D map, it is impossible to find which photos captured a specific model component (such as a tilted model component or a point cloud model component); the shooting range of photos is generally large, and existing photo indexing techniques generally struggle to effectively determine the effective shooting space range of a photo. Summary of the Invention
[0004] Therefore, it is necessary to provide a spatial indexing method, apparatus, and computer equipment that can reverse the lookup of which photos can capture images of a component on a 3D map by using a tilted model, a BIM (Building Information Modeling) model component, or any spatial coordinate position.
[0005] In a first aspect, this disclosure provides a spatial indexing method for images. The method includes:
[0006] Obtain the spatial coordinate data and target resolution of the target query point, wherein the spatial coordinate data includes longitude data, latitude data, and altitude data;
[0007] Using the spatial coordinate data, a first candidate set of target images is obtained by filtering the shooting buffer in a pre-built database. The shooting buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution.
[0008] The images in the first candidate set are subjected to horizontal and vertical frustum filtering to obtain a second candidate set of target images.
[0009] Calculate the effective object resolution of the images in the second candidate set, and compare the effective object resolution with the target resolution to determine the target image set that meets the target resolution.
[0010] In one embodiment, the pre-built database includes:
[0011] An image parameter database and an imaging device parameter database, wherein the image parameter database stores parameter information of images and the imaging device parameter database stores parameter information of the imaging device;
[0012] The parameter information of the image includes the image capture coordinates obtained by reading the global positioning system information embedded in the image, and the parameter information of the shooting device includes the attitude information of the shooting device obtained by acquiring the positioning and attitude determination system information, including the azimuth angle, roll angle and pitch angle of the shooting device.
[0013] In one embodiment, the step of using the spatial coordinate data to filter the shooting buffer in a pre-built database to obtain a first candidate set of target images includes:
[0014] The visible distance is determined based on the ground feature resolution parameters of the shooting device and the target resolution. The ground feature resolution parameters of the shooting device include the horizontal ground feature resolution parameters and the vertical ground feature resolution parameters of the shooting device.
[0015] The shooting buffer zone is determined with the spatial coordinates of the target query point as the center and the visible distance as the radius;
[0016] The first candidate set of target images is determined by taking the intersection of the shooting buffer and the image parameter database.
[0017] In one embodiment, determining the visible distance based on the ground feature resolution parameters of the imaging device and the target resolution includes:
[0018] Obtain the maximum values of the horizontal ground feature resolution parameters and the maximum values of the vertical ground feature resolution parameters of the camera device in the camera device parameter database, respectively.
[0019] The first radius is obtained by dividing the target resolution by the maximum value of the horizontal ground feature resolution parameter of the imaging device;
[0020] The second radius is obtained by dividing the target resolution by the maximum value of the vertical ground feature resolution parameter of the imaging device.
[0021] Compare the first radius and the second radius. If the first radius is greater than the second radius, then the first radius is determined as the visible distance.
[0022] If the first radius is smaller than the second radius, then the second radius is determined as the visible distance. In one embodiment, the step of performing frustum horizontal axis filtering and frustum vertical axis filtering on the images in the first candidate set to obtain a second candidate set of the target image includes:
[0023] Convert the spatial coordinate data of the target query point into planar coordinate data of the target query point;
[0024] Convert the image capture coordinates corresponding to the images in the first candidate set into image capture plane coordinate data;
[0025] For any image in the first candidate set, the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane are determined based on the planar coordinate data of the target query point and the planar coordinate data of the image capture.
[0026] The images in the first candidate set are filtered according to the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane to obtain a second candidate set of target images.
[0027] In one embodiment, calculating the effective object resolution of images in the second candidate set and comparing the effective object resolution with the target resolution to determine the target image set that meets the target resolution includes:
[0028] Using the formula for calculating the distance between two points in three-dimensional space, the effective distance between the image capture coordinates in the second candidate set and the planar coordinates of the target query point is calculated.
[0029] The first resolution is determined by multiplying the horizontal feature resolution parameters of the images in the second candidate set by the effective distance;
[0030] The second resolution is determined by multiplying the vertical feature resolution parameter of the images in the second candidate set by the effective distance;
[0031] If the first resolution is greater than the second resolution, then the first resolution is determined as the effective object resolution of the image in the second candidate set; otherwise, the second resolution is determined as the effective object resolution of the image in the second candidate set.
[0032] Images with an effective object resolution greater than the target resolution in the second candidate set are identified as the target image set.
[0033] In one embodiment, the method further includes:
[0034] The target image set is filtered according to preset filtering conditions to obtain a target image set that meets the preset filtering conditions, wherein the preset filtering conditions include the shooting date field, shooting time field, shooting height field, and shooting device model field.
[0035] Secondly, this disclosure also provides a spatial indexing device for images. The device includes:
[0036] The target acquisition module is used to acquire the spatial coordinate data and target resolution of the target query point. The spatial coordinate data includes longitude data, latitude data, and altitude data.
[0037] The first candidate set determination module is used to filter the shooting buffer in a pre-built database using the spatial coordinate data to obtain a first candidate set of target images. The shooting buffer is a set of images within a radius determined based on the parameters of the shooting device and the target resolution.
[0038] The second candidate set determination module is used to perform horizontal axis filtering and vertical axis filtering of the view frustum on the images in the first candidate set to obtain a second candidate set of the target image.
[0039] The target image set determination module is used to calculate the effective object resolution of the images in the second candidate set, compare the effective object resolution with the target resolution, and determine the target image set that meets the target resolution.
[0040] Thirdly, this disclosure also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the methods described in any embodiment of this disclosure.
[0041] Fourthly, this disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the methods described in any embodiment of this disclosure.
[0042] Fifthly, this disclosure also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the methods described in any embodiment of this disclosure.
[0043] The implementation scheme provided in this disclosure acquires the spatial coordinate data and target resolution of the target query point. The spatial coordinate data includes longitude, latitude, and altitude data. Using the spatial coordinate data, a shooting buffer is filtered in a pre-constructed database to obtain a first candidate set of target images. The shooting buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution. Images in the first candidate set are then subjected to horizontal and vertical frustum filtering to obtain a second candidate set of target images. The effective object resolution of the images in the second candidate set is calculated, and the effective object resolution is compared with the target resolution to determine the target image set that meets the target resolution. In this implementation scheme, by establishing a database and using the spatial coordinates and target resolution of the target query point to retrieve which images in the database can capture the target query point, the management capability of inspection results can be improved, the value and effectiveness of machine-generated inspection images can be enhanced, and inspection personnel can assist in the detailed inspection and management of various model components. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0045] Figure 1 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0046] Figure 2 is a horizontal cross-sectional view of the camera's line of sight in a spatial indexing method for images in one embodiment;
[0047] Figure 3 is a vertical cross-sectional view of the camera's line of sight in a spatial indexing method for images in one embodiment;
[0048] Figure 4 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0049] Figure 5 is a schematic diagram of the calculation of the shooting buffer in the spatial indexing method of an image in one embodiment;
[0050] Figure 6 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0051] Figure 7 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0052] Figure 8 is a schematic diagram of determining the relative azimuth angle of the horizontal axis plane in the horizontal axis filtering of the view frustum in an embodiment of the spatial indexing method for images.
[0053] Figure 9 is a schematic diagram of determining the relative azimuth angle of the vertical axis plane in the vertical axis filtering of the view frustum in an embodiment of the spatial indexing method for images.
[0054] Figure 10 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0055] Figure 11 is a flowchart illustrating a spatial indexing method for images in one embodiment;
[0056] Figure 12 is a structural block diagram of an image spatial indexing device in one embodiment;
[0057] Figure 13 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.
[0059] In one embodiment, as shown in Figure 1, a spatial indexing method for images is provided. This embodiment illustrates the application of this method to a terminal, but it is understood that the method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. During UAV inspections, a large number of images are generated. By reading the GPS information embedded in the UAV inspection photos, the shooting location information is obtained. By obtaining the positioning and attitude system information, the camera attitude information (azimuth, roll, and pitch) at the time of shooting is obtained. By reading the photo resolution, the preset vertical field of view, and the horizontal field of view, the photo's field of view angle is obtained. Based on these parameters, the effective spatial field of view (view frustum) is calculated. Based on the calculation of the effective spatial field of view (view frustum), a spatial index database is constructed to store the shooting coordinates and effective spatial view frustum range corresponding to each photo. Combined with database indexing technology, it is possible to retrieve all captured photos within space based on the shooting location.
[0060] In this embodiment, the method includes the following steps:
[0061] S102, obtain the spatial coordinate data and target resolution of the target query point, wherein the spatial coordinate data includes longitude data, latitude data and altitude data.
[0062] S104, using the spatial coordinate data to filter the shooting buffer in a pre-built database to obtain a first candidate set of target images, wherein the shooting buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution.
[0063] S106, perform horizontal and vertical frustum filtering on the images in the first candidate set to obtain a second candidate set of target images.
[0064] S108, calculate the effective object resolution of the images in the second candidate set, and compare the effective object resolution with the target resolution to determine the target image set that meets the target resolution.
[0065] Specifically, the spatial coordinates and target resolution of the target query point can be obtained. The spatial coordinates include longitude, latitude, and altitude data; the target resolution may include a defined value, meaning the resolution of the retrieved target image must be greater than or equal to the target resolution. Then, the spatial coordinates are used to filter images in a pre-built database using a shooting buffer to obtain a first candidate set of target images. The shooting buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution. Next, the images in the first candidate set can be filtered using both horizontal and vertical frustum axes to obtain a second candidate set of target images. The effective object resolution of the images in the second candidate set is calculated and compared with the target resolution. When the effective object resolution of an image in the second candidate set is greater than or equal to the target resolution, the image is determined as a target image set that meets the target resolution.
[0066] In the above-described spatial indexing method for images, spatial coordinate data and target resolution of the target query point are obtained. The spatial coordinate data includes longitude, latitude, and altitude data. The spatial coordinate data is used to filter the image buffer in a pre-constructed database to obtain a first candidate set of target images. The image buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution. Images in the first candidate set are subjected to horizontal and vertical frustum filtering to obtain a second candidate set of target images. The effective object resolution of the images in the second candidate set is calculated, and the effective object resolution is compared with the target resolution to determine the target image set that meets the target resolution. In the implementation scheme provided in this disclosure, by establishing a database and using the spatial coordinates and target resolution of the target query point to search the database for images that can capture the target query point, the management capability of inspection results can be improved, the value and effectiveness of machine-generated inspection images can be enhanced, and inspection personnel can assist in the detailed inspection and management of various model components.
[0067] In one embodiment, the pre-built database includes:
[0068] An image parameter database and an imaging device parameter database, wherein the image parameter database stores parameter information of images and the imaging device parameter database stores parameter information of the imaging device;
[0069] The parameter information of the image includes the image capture coordinates obtained by reading the global positioning system information embedded in the image, and the parameter information of the shooting device includes the attitude information of the shooting device obtained by acquiring the positioning and attitude determination system information, including the azimuth angle, roll angle and pitch angle of the shooting device.
[0070] Specifically, the image parameter database stores image parameter information, including image capture coordinates obtained by reading the Global Positioning System (GPS) information embedded in the image; the image parameter information may also include the image's GUID (Globally Unique Identifier), format, photo name, capture time, longitude, latitude, altitude, camera azimuth, camera pitch, camera roll, camera manufacturer, camera model, lens manufacturer, lens model, aperture, shutter speed, ISO (International Organization for Standardization), focal length, 35mm equivalent focal length, brightness, horizontal pixels, vertical pixels, horizontal resolution, vertical resolution, horizontal terrain resolution parameters, vertical map resolution parameters, photo azimuth start point, photo azimuth end point, photo pitch start point, photo pitch end point, and photo path. The shooting device parameter database stores shooting device parameter information, including the shooting device's attitude information obtained by acquiring positioning and attitude system information, including the shooting device's azimuth, roll, and pitch angles. The shooting device may include a camera, and the parameter information of the shooting device may include the camera's parameter information, which may include the camera's ID (Identify Documents), camera manufacturer, camera model, horizontal field of view, vertical field of view, horizontal pixels, vertical pixels, horizontal resolution, vertical resolution, horizontal ground feature resolution parameters, and vertical ground feature resolution parameters.
[0071] In some implementations, camera parameter information can be stored in a camera parameter database. The camera parameter information stored in the camera parameter database may include the camera ID (Identify Documents), camera manufacturer, camera model, horizontal field of view, vertical field of view, horizontal pixels, vertical pixels, horizontal resolution, vertical resolution, horizontal ground feature resolution parameters, and vertical ground feature resolution parameters.
[0072] In other embodiments, the parameter information of the photo can be stored in a photo parameter database. The step of storing the parameter information of the photo in the photo parameter database may include the following:
[0073] (1) Extraction of EXIF (Exchangeable Image File) information of photos: The program reads the EXIF (Exchangeable Image File) information of each photo and stores the basic information in the photo basic index table.
[0074] (2) Extraction of photo coordinate information: The program reads the GPS (Global Positioning System) information (longitude, latitude, altitude) in each photo, that is, the spatial coordinate information when the photo was taken, and stores it in the photo basic index table.
[0075] (3) Photo POS (Positioning and Attitude System) Information Extraction: The program reads the POS information (azimuth angle PosAz, pitch angle PosPa, roll angle) from each photo, that is, the spatial attitude information of the camera when the photo is taken, and stores it in the photo basic index table.
[0076] (4) Spatial Index Calculation: Using the camera's parameter information and spatial attitude information, the spatial index is calculated. This calculation completes the X-axis and Y-axis decomposition of the camera's field of view frustum. (The frustum decomposition primarily addresses the low efficiency of spatial indexing in 3D frustums by employing X-axis and Y-axis latitude indexing after frustum spatial decomposition). The final calculation results for this step are: horizontal feature resolution parameter (PxX), vertical map resolution parameter (PxY), photo azimuth starting point (AzS), photo azimuth ending point (AzE), photo pitch starting point (PaS), and photo pitch ending point (PaE). The horizontal feature resolution parameter (PxX) represents the current photo's horizontal feature resolution coefficient. Multiplying this coefficient by the distance from the camera's focal plane to the target object yields the corresponding horizontal feature resolution (meters / pixel). The vertical feature resolution parameter (PxY) represents the current photo's vertical feature resolution coefficient. Multiplying this coefficient by the distance from the camera's focal plane to the target object yields the corresponding vertical feature resolution (meters / pixel). The starting point of the azimuth angle (AzS), the ending point of the azimuth angle (AzE), the starting point of the elevation angle (PaS), and the ending point of the elevation angle (PaE) are used to determine whether a scene is within the field of view during photo search. The horizontal feature resolution is calculated as: PxX = tan(FovX / 2) / PixX×2, as shown in Figure 2, where FovX represents the camera's horizontal field of view, and PixX represents the camera's horizontal resolution. The vertical feature resolution is calculated as: PxY = tan(FovY / 2) / PixY×2, as shown in Figure 3, where FovY represents the camera's vertical field of view, and PixY represents the camera's vertical resolution.
[0077] The starting point of the azimuth angle for a photograph is calculated as follows: AzS = PosAz - FovX / 2. The ending point of the azimuth angle for a photograph is calculated as follows: AzS = PosAz + FovX / 2. The starting point of the elevation angle for a photograph is calculated as follows: PaS = PosPa - FovY / 2. The ending point of the elevation angle for a photograph is calculated as follows: PaE = PosPa + FovY / 2.
[0078] In this embodiment, by establishing an image parameter database and an imaging device parameter database, the parameter information of the image and the imaging device can be stored in advance in the database used for image searching, which can make the spatial indexing of images more efficient and accurate.
[0079] In one embodiment, as shown in Figure 4, step S104 uses the spatial coordinate data to perform image buffer filtering in a pre-built database to obtain a first candidate set of target images, including:
[0080] S402, determine the visible distance based on the ground feature resolution parameters of the shooting device and the target resolution. The ground feature resolution parameters of the shooting device include the horizontal ground feature resolution parameters and the vertical ground feature resolution parameters of the shooting device.
[0081] S404. Determine the shooting buffer zone with the spatial coordinates of the target query point as the center and the visible distance as the radius.
[0082] S406, take the intersection of the shooting buffer and the image parameter database to determine the first candidate set of target images.
[0083] Specifically, the visible distance can be determined based on the ground object resolution parameters of the shooting device and the target resolution. Then, the shooting buffer can be determined with the spatial coordinate data of the target query point as the center and the visible distance as the radius. Finally, the intersection of the shooting buffer and the image parameter database can be taken to determine the first candidate set of target images.
[0084] In some implementations, a circle is drawn with the spatial coordinates of the target query point as the center and the maximum visible distance R as the radius, thus obtaining the shooting buffer. As shown in Figure 5, a database spatial query method is used to determine the intersection of the circle with all photos in the photo index table, obtaining all photos within the buffer area.
[0085] In this embodiment, by determining the visible distance, and then using the spatial coordinates of the target query point as the center and the visible distance as the radius, a shooting buffer is determined. Finally, the intersection of the shooting buffer and the image parameter database is taken to determine the first candidate set of target images. Furthermore, by using the spatial coordinates of the target query point to look up which images in the database can capture that target query point, the management capability of inspection results can be improved, the value and effectiveness of machine inspection images can be enhanced, and inspection personnel can be assisted in conducting detailed inspections and management of various model components.
[0086] In one embodiment, as shown in FIG6, step S402, determining the visible distance based on the ground feature resolution parameters of the imaging device and the target resolution, includes:
[0087] S602, respectively obtain the maximum value of the horizontal ground feature resolution parameter of the shooting device and the maximum value of the vertical ground feature resolution parameter of the shooting device in the shooting device parameter database.
[0088] S604, the first radius is obtained by dividing the target resolution by the maximum value of the horizontal ground feature resolution parameter of the shooting device.
[0089] S606, the second radius is obtained by dividing the target resolution by the maximum value of the vertical ground feature resolution parameter of the shooting device.
[0090] S608, compare the first radius and the second radius. If the first radius is greater than the second radius, then determine the first radius as the visible distance.
[0091] S610, if the first radius is smaller than the second radius, then the second radius is determined as the visible distance.
[0092] Specifically, the first radius can be obtained by obtaining the maximum horizontal and vertical ground feature resolution parameters of the shooting device from the shooting device parameter database, respectively. Then, the target resolution is divided by the maximum horizontal ground feature resolution parameter to obtain the second radius. The first and second radii are then compared. If the first radius is greater than the second radius, the first radius is determined as the visible distance; otherwise, the second radius is determined as the visible distance.
[0093] In some implementations, the maximum value of the horizontal ground feature resolution parameter of all cameras in the camera parameter database can be obtained as PxX; and the maximum value of the vertical ground feature resolution parameter of all cameras in the camera parameter database can be obtained as PxY.
[0094] Rx = ExpPix / PxX
[0095] Ry = ExpPix / PxY
[0096] The maximum value of Rx and Ry is taken as the maximum visible distance R, where ExpPix can include the target ground feature resolution of the expected image.
[0097] In this embodiment, by determining the visible distance based on the ground feature resolution parameters of the shooting device and the target resolution, the determination of the shooting buffer can be made more accurate.
[0098] In one embodiment, as shown in FIG7, step S106 performs frustum horizontal axis filtering and frustum vertical axis filtering on the images in the first candidate set to obtain a second candidate set of target images, including:
[0099] S702, convert the spatial coordinate data of the target query point into planar coordinate data of the target query point.
[0100] S704, convert the image capture coordinates corresponding to the images in the first candidate set into image capture plane coordinate data.
[0101] S706, for any image in the first candidate set, determine the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane based on the planar coordinate data of the target query point and the planar coordinate data of the image capture.
[0102] S708, the images in the first candidate set are filtered according to the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane to obtain a second candidate set of target images.
[0103] Specifically, the spatial coordinate data of the target query point can be converted into planar coordinate data of the target query point, and the image capture coordinates corresponding to the images in the first candidate set can be converted into image capture planar coordinate data. For any image in the first candidate set, the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane can be determined according to the planar coordinate data of the target query point and the image capture planar coordinate data, respectively. The images in the first candidate set can be filtered according to the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane to obtain a second candidate set of target images.
[0104] In some implementations, the spatial coordinate data of the target query point is converted into planar coordinate data of the target query point in the following way:
[0105] X = Longitude × 20037508.34 / 180 = longitude × 20037508.34 / 180
[0106] Y=LN(TAN((latitude+90)×π / 360)) / (π / 180)×20037508.34 / 180=LN(TAN((Lat+90)×π / 360)) / (π / 180)×20037508.34 / 180
[0107] Z = H
[0108] Using the above formula, the spatial coordinates (OLat, OLon, OH) of the target query point can be converted to (OX, OY, OZ).
[0109] Convert the coordinates (NLat, NLon, NH) of the photo's shooting point to (NX, NY, NZ).
[0110] The relative azimuth angle δ is calculated using the spatial coordinates (OX, OY, OZ) of the target query point and the coordinates (NX, NY, NZ) of any initially screened photograph. As shown in Figure 8,
[0111] δ=arctan{(OY-NY) / (OX-NX)}
[0112] The query is performed based on database conditions, with the following conditions:
[0113] Photo azimuth origin (AzS) < δ
[0114] Photo azimuth endpoint (AzE) > δ
[0115] The relative pitch angle in the vertical XZ axis plane is calculated using the spatial coordinates (OX, OY, OZ) of the target query point and the shooting coordinates (NX, NY, NZ) of any initially screened photo. The relative pitch angle is θ, as shown in Figure 9.
[0116] θ = arctan(((OX - NX)) 2 +(OY-NY) 2 ) 1 / 2 / (OZ-NZ))
[0117] The query is performed based on database conditions, with the following conditions:
[0118] Photo pitch angle starting point (PaS) < θ
[0119] Photo pitch angle endpoint (PaE) > θ
[0120] In this embodiment, by performing horizontal and vertical axis filtering of the view frustum on the images in the first candidate set, a second candidate set of target images is obtained, which can improve the management capability of inspection results and enhance the value and effectiveness of machine inspection images.
[0121] In one embodiment, as shown in FIG10, step S108 calculates the effective object resolution of the images in the second candidate set, and compares the effective object resolution with the target resolution to determine the target image set that meets the target resolution, including:
[0122] S1002, using the calculation formula between two points in three-dimensional space, calculates the effective distance between the image capture coordinates in the second candidate set and the planar coordinate data of the target query point.
[0123] S1004, the first resolution is determined by multiplying the horizontal feature resolution parameters of the images in the second candidate set by the effective distance.
[0124] S1006, the second resolution is determined by multiplying the vertical feature resolution parameter of the image in the second candidate set by the effective distance.
[0125] S1008, if the first resolution is greater than the second resolution, then the first resolution is determined as the effective object resolution of the image in the second candidate set; otherwise, the second resolution is determined as the effective object resolution of the image in the second candidate set.
[0126] S1010, the images in the second candidate set whose effective object resolution is greater than the target resolution are determined as the target image set.
[0127] Specifically, the effective distance between the image capture coordinates in the second candidate set and the planar coordinates of the target query point can be calculated using the calculation formula between two points in three-dimensional space. Then, the first resolution is determined by multiplying the horizontal feature resolution parameter of the images in the second candidate set by the effective distance; the second resolution is determined by multiplying the vertical feature resolution parameter of the images in the second candidate set by the effective distance. If the first resolution is greater than the second resolution, the first resolution is determined as the effective feature resolution of the images in the second candidate set; otherwise, the second resolution is determined as the effective feature resolution of the images in the second candidate set. Images in the second candidate set whose effective feature resolution is greater than the target resolution are determined as the target image set.
[0128] In some implementations, the distance L from the photo capture point (NLat, NLon, NH) to the spatial coordinates (OX, OY, OZ) of the target query point can be calculated using the following method:
[0129] L = ((OX - NX)) 2 +(OY-NY) 2 +(OZ-NZ) 2 ) 1 / 3
[0130] By taking the horizontal feature resolution parameters (PxX) and vertical feature resolution parameters (PxY) of the photo, the effective feature resolution PixT corresponding to the photo can be calculated.
[0131] PixTx=PxX×L
[0132] PixTy=PxY×L
[0133] The maximum value between PixTx and PixTy is taken as PixT. This gives the resolution (meters / pixel) of the target object in the photo taken from that point. The effective object resolution PixT for each photo in the filtered results is calculated and compared with the target object's ground object resolution (ExpPix). If PixT > ExpPix, the GUID of that photo is retained; otherwise, it is discarded.
[0134] In this embodiment, by screening the photos in the second candidate set to see if they meet the target resolution, the ability to manage inspection results can be improved, the value and effectiveness of machine inspection images can be enhanced, and inspection personnel can be assisted in conducting detailed inspections and management of various model components.
[0135] In one embodiment, the method further includes:
[0136] The target image set is filtered according to preset filtering conditions to obtain a target image set that meets the preset filtering conditions, wherein the preset filtering conditions include the shooting date field, shooting time field, shooting height field, and shooting device model field.
[0137] Specifically, the target image set can be filtered according to preset filtering conditions such as shooting date field, shooting time field, shooting height field, shooting device model field, etc., to obtain a target image set that meets the preset filtering conditions.
[0138] In this embodiment, by filtering the target image set according to preset filtering conditions, a target image set that meets the preset filtering conditions can be obtained, which can make the target image set meet the target resolution and improve the value and effectiveness of the machine patrol images.
[0139] In one embodiment, as shown in Figure 11, a spatial indexing method for an image is provided, the method comprising the following steps:
[0140] S1102, Obtain the spatial coordinate data and target resolution of the target query point, wherein the spatial coordinate data includes longitude data, latitude data and altitude data.
[0141] S1104, respectively obtain the maximum value of the horizontal ground feature resolution parameter of the shooting device and the maximum value of the vertical ground feature resolution parameter of the shooting device in the shooting device parameter database.
[0142] S1106, the first radius is obtained by dividing the target resolution by the maximum value of the horizontal ground feature resolution parameter of the shooting device.
[0143] S1108, the second radius is obtained by dividing the target resolution by the maximum value of the vertical ground feature resolution parameter of the shooting device.
[0144] S1110, compare the first radius and the second radius. If the first radius is greater than the second radius, then determine the first radius as the visible distance.
[0145] S1112, if the first radius is smaller than the second radius, then the second radius is determined as the visible distance.
[0146] S1114, Using the spatial coordinates of the target query point as the center and the visible distance as the radius, determine the shooting buffer.
[0147] S1116, take the intersection of the shooting buffer and the image parameter database to determine the first candidate set of target images.
[0148] S1118, convert the spatial coordinate data of the target query point into planar coordinate data of the target query point.
[0149] S1120, convert the image capture coordinates corresponding to the images in the first candidate set into image capture plane coordinate data.
[0150] S1122, For any image in the first candidate set, determine the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane based on the planar coordinate data of the target query point and the planar coordinate data of the image capture.
[0151] S1124, the images in the first candidate set are filtered according to the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane to obtain a second candidate set of target images.
[0152] S1126, using the calculation formula between two points in three-dimensional space, calculate the effective distance between the image capture coordinates in the second candidate set and the planar coordinate data of the target query point.
[0153] S1128, the first resolution is determined by multiplying the horizontal feature resolution parameters of the images in the second candidate set by the effective distance.
[0154] S1130, the second resolution is determined by multiplying the vertical ground feature resolution parameter of the image in the second candidate set by the effective distance.
[0155] S1132, if the first resolution is greater than the second resolution, then the first resolution is determined as the effective object resolution of the image in the second candidate set; otherwise, the second resolution is determined as the effective object resolution of the image in the second candidate set.
[0156] S1134, determine the images in the second candidate set whose effective object resolution is greater than the target resolution as the target image set.
[0157] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple steps or stages, which are not necessarily completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0158] Based on the same inventive concept, this disclosure also provides a spatial indexing device for image capturing range to implement the spatial indexing method for image capturing range described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the spatial indexing device for image capturing range provided below can be found in the limitations of the spatial indexing method for image capturing range described above, and will not be repeated here.
[0159] In one embodiment, as shown in FIG12, a spatial indexing device 1200 for an image is provided, comprising: a target acquisition module 1202, a first candidate set determination module 1204, a second candidate set determination module 1206, and a target image set determination module 1208, wherein:
[0160] The target acquisition module 1202 is used to acquire the spatial coordinate data and target resolution of the target query point. The spatial coordinate data includes longitude data, latitude data and altitude data.
[0161] The first candidate set determination module 1204 is used to filter the shooting buffer in a pre-constructed database using the spatial coordinate data to obtain a first candidate set of target images. The shooting buffer is a set of images within a radius determined based on the parameters of the shooting device and the target resolution.
[0162] The second candidate set determination module 1206 is used to perform horizontal axis filtering and vertical axis filtering on the images in the first candidate set to obtain a second candidate set of the target image.
[0163] The target image set determination module 1208 is used to calculate the effective object resolution of the images in the second candidate set, compare the effective object resolution with the target resolution, and determine the target image set that meets the target resolution.
[0164] Each module in the aforementioned spatial indexing device for image capture range can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0165] In one embodiment, a computer device, which may be a server, is provided, and its internal structure is shown in Figure 13. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores spatial index data of the image capture range. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a spatial indexing method for the image capture range.
[0166] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in Figure 13. The computer device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a spatial indexing method for images. The display screen of the computer device may be a liquid crystal display (LCD) or an e-ink display. The input device of the computer device may be a touch layer covering the display screen, or buttons, a trackball, or a touchpad located on the casing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0167] Those skilled in the art will understand that the structure shown in Figure 13 is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0168] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0169] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0170] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this disclosure may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this disclosure may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the appended claims.
Claims
1. A spatial indexing method for images, characterized in that, The method includes: acquiring spatial coordinate data and target resolution of a target query point, wherein the spatial coordinate data includes longitude data, latitude data, and altitude data; using the spatial coordinate data to perform shooting buffer filtering in a pre-constructed database to obtain a first candidate set of target images, wherein the shooting buffer is a set of images within a radius determined by the parameters of the shooting device and the target resolution; performing frustum horizontal axis filtering and frustum vertical axis filtering on the images in the first candidate set to obtain a second candidate set of target images; calculating the effective object resolution of the images in the second candidate set, and comparing the effective object resolution with the target resolution to determine a set of target images that meet the target resolution; wherein, the step of using the spatial coordinate data to perform shooting buffer filtering in a pre-constructed database to obtain the first candidate set of target images includes: determining the visible distance according to the ground object resolution parameters of the shooting device and the target resolution, wherein the ground object resolution parameters of the shooting device include shooting distance, latitude data, and altitude data; The device's horizontal ground feature resolution parameters and the imaging device's vertical ground feature resolution parameters are used. A shooting buffer is determined with the target query point's spatial coordinate data as the center and the visible distance as the radius. The intersection of the shooting buffer and the image parameter database is used to determine a first candidate set of target images. The step of performing horizontal and vertical frustum filtering on the images in the first candidate set to obtain a second candidate set of target images includes: converting the target query point's spatial coordinate data into the target query point's planar coordinate data; converting the image shooting coordinates corresponding to the images in the first candidate set into image shooting planar coordinate data; for any image in the first candidate set, determining the horizontal axis plane relative azimuth angle and the vertical axis plane relative pitch angle based on the target query point's planar coordinate data and the image shooting planar coordinate data; filtering the images in the first candidate set based on the horizontal axis plane relative azimuth angle and the vertical axis plane relative pitch angle to obtain a second candidate set of target images.
2. The method according to claim 1, characterized in that, The pre-built database includes an image parameter database and a shooting device parameter database. The image parameter database stores parameter information of images, and the shooting device parameter database stores parameter information of the shooting device. The parameter information of the images includes the image shooting coordinates obtained by reading the global positioning system information embedded in the image. The parameter information of the shooting device includes the attitude information of the shooting device obtained by acquiring positioning and attitude system information. The attitude information includes the azimuth angle, roll angle, and pitch angle of the shooting device.
3. The method according to claim 1, characterized in that, The step of determining the visible distance based on the ground feature resolution parameters of the shooting device and the target resolution includes: obtaining the maximum value of the horizontal ground feature resolution parameters of the shooting device and the maximum value of the vertical ground feature resolution parameters of the shooting device from the shooting device parameter database; obtaining a first radius by dividing the target resolution by the maximum value of the horizontal ground feature resolution parameters of the shooting device; obtaining a second radius by dividing the target resolution by the maximum value of the vertical ground feature resolution parameters of the shooting device; comparing the first radius and the second radius, if the first radius is greater than the second radius, then the first radius is determined as the visible distance; if the first radius is less than the second radius, then the second radius is determined as the visible distance.
4. The method according to claim 1, characterized in that, The step of calculating the effective object resolution of images in the second candidate set and comparing the effective object resolution with the target resolution to determine the target image set that meets the target resolution includes: calculating the effective distance between the image capture coordinates in the second candidate set and the planar coordinates of the target query point using the calculation formula between two points in three-dimensional space; determining a first resolution by multiplying the horizontal object resolution parameter of the images in the second candidate set by the effective distance; determining a second resolution by multiplying the vertical object resolution parameter of the images in the second candidate set by the effective distance; determining the first resolution as the effective object resolution of the images in the second candidate set if the first resolution is greater than the second resolution; otherwise, determining the second resolution as the effective object resolution of the images in the second candidate set; and determining the images in the second candidate set whose effective object resolution is greater than the target resolution as the target image set.
5. The method according to claim 1, characterized in that, The method further includes: filtering the target image set according to preset filtering conditions to obtain a target image set that meets the preset filtering conditions, wherein the preset filtering conditions include a shooting date field, a shooting time field, a shooting height field, and a shooting device model field.
6. A spatial indexing device for images, characterized in that, The device includes: a target acquisition module for acquiring spatial coordinate data and target resolution of a target query point, wherein the spatial coordinate data includes longitude data, latitude data, and altitude data; a first candidate set determination module for using the spatial coordinate data to perform shooting buffer filtering in a pre-constructed database to obtain a first candidate set of target images, wherein the shooting buffer is a set of images within a radius determined based on the parameters of the shooting device and the target resolution; a second candidate set determination module for performing frustum horizontal axis filtering and frustum vertical axis filtering on the images in the first candidate set to obtain a second candidate set of target images; and a target image set determination module for calculating the effective object resolution of the images in the second candidate set and comparing the effective object resolution with the target resolution to determine a set of target images that meet the target resolution; wherein, the step of using the spatial coordinate data to perform shooting buffer filtering in a pre-constructed database to obtain the first candidate set of target images includes: based on the ground object resolution parameters of the shooting device and the target resolution, The visible distance is determined, and the ground feature resolution parameters of the imaging device include the horizontal ground feature resolution parameters and the vertical ground feature resolution parameters of the imaging device; a shooting buffer is determined with the spatial coordinate data of the target query point as the center and the visible distance as the radius; the intersection of the shooting buffer and the image parameter database is taken to determine a first candidate set of target images; the step of performing horizontal and vertical frustum filtering on the images in the first candidate set to obtain a second candidate set of target images includes: converting the spatial coordinate data of the target query point into planar coordinate data of the target query point; converting the image shooting coordinates corresponding to the images in the first candidate set into image shooting planar coordinate data; for any image in the first candidate set, determining the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane according to the planar coordinate data of the target query point and the image shooting planar coordinate data; filtering the images in the first candidate set according to the relative azimuth angle of the horizontal axis plane and the relative pitch angle of the vertical axis plane to obtain a second candidate set of target images.
7. The apparatus according to claim 6, characterized in that, The pre-built database includes an image parameter database and a shooting device parameter database. The image parameter database stores parameter information of images, and the shooting device parameter database stores parameter information of the shooting device. The parameter information of the images includes the image shooting coordinates obtained by reading the global positioning system information embedded in the image. The parameter information of the shooting device includes the attitude information of the shooting device obtained by acquiring positioning and attitude system information. The attitude information includes the azimuth angle, roll angle, and pitch angle of the shooting device.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
High-resolution remote sensing image search method fused with spatial relation semantics
CN101692224A
Implement method of lightweight-class global multi-dimensional remote-sensing image network map service
CN103455624A