CN109856657B - Path recording method based on image transformation - Google Patents

Path recording method based on image transformation Download PDF

Info

Publication number
CN109856657B
CN109856657B CN201910160973.4A CN201910160973A CN109856657B CN 109856657 B CN109856657 B CN 109856657B CN 201910160973 A CN201910160973 A CN 201910160973A CN 109856657 B CN109856657 B CN 109856657B
Authority
CN
China
Prior art keywords
image
path
data
map
transformation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910160973.4A
Other languages
Chinese (zh)
Other versions
CN109856657A (en
Inventor
艾玲梅
李天东
李艳玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Normal University
Original Assignee
Shaanxi Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shaanxi Normal University filed Critical Shaanxi Normal University
Priority to CN201910160973.4A priority Critical patent/CN109856657B/en
Publication of CN109856657A publication Critical patent/CN109856657A/en
Application granted granted Critical
Publication of CN109856657B publication Critical patent/CN109856657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a path recording method based on image transformation, which comprises the following steps: 1) collecting path image data containing GPS data; 2) separating the GPS data from the image data to obtain image data of each GPS data corresponding to one path image; 3) converting GPS data into map image coordinates, wherein each map image coordinate corresponds to an image array of a path image; 4) converting the image data of the path image relative to the image corresponding to the map image coordinates and adding a background image; 5) and printing the image which is added with the background image and is transformed to obtain a path record image. The invention can record the whole track of the path and describe the local information of the path, and has the characteristics of low cost, high speed and high reliability.

Description

Path recording method based on image transformation
Technical Field
The invention relates to a path recording method, in particular to a path recording method based on image transformation.
Background
The recorded path can be convenient for selecting a more appropriate path in the subsequent path planning process, and the advantages and the disadvantages of the recorded path are summarized. The existing path recording method comprises the steps of adopting a track map and video recording, and the methods have some defects.
Specifically, the track map can only simply record the whole track of the path and cannot describe the local information of the path, while the recording method using video recording can describe the local information of the path, but cannot reflect the whole track information of the path, and needs a large amount of storage capacity, and for the difficulty of searching the path information, the track map needs to be checked through a time axis.
Disclosure of Invention
In view of the above problems in the prior art, an object of the present invention is to provide a path recording method based on image transformation, which can record the entire path and describe the local information of the path, and has low cost, high speed and high reliability.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
1) collecting path image data containing GPS data;
2) separating the GPS data from the image data to obtain image data of each GPS data corresponding to one path image;
3) converting GPS data into map image coordinates, wherein each map image coordinate corresponds to image data of one path image;
4) converting the image data of the path image relative to the image corresponding to the map image coordinates and adding a background image;
5) and printing the image which is added with the background image and is transformed to obtain a path record image.
The path image data containing the GPS data in the step 1) is obtained by shooting through a mobile phone or a digital camera.
And 2) expanding the GPS geographic position data through a function of reading original data of the image by JavaScript when the GPS data is separated from the image data. And when the GPS data is converted into the map image coordinate, the conversion relation between the image coordinate system and the world coordinate system is utilized to call the API interface of the map for realization. In the step 4), a background image is added firstly, and then the two-dimensional array of the image is subjected to image transformation relative to the coordinates of the corresponding map image, so that each coordinate and the corresponding image are processed in a circulating manner; or, firstly, the two-dimensional array of the image is subjected to image transformation relative to the coordinates of the corresponding map image, so that each coordinate and the corresponding image are processed circularly, and then the background image is added. And the background image is added according to a plane map which is preset and drawn by the maximum value and the minimum value of the GPS data. Map image coordinates (x) from the path imagei,yi) Determining the position x-x of the path image in the background imagei/(xmax-xmin),y=q*yi/(ymax-ymin) In the formula, xmin,xmax,ymin,ymaxThe maximum value and the minimum value of the map image coordinate are obtained, and the size of a pixel is p × q; the change (x) of the map image coordinates of the route imagei-xi-1,yi-yi-1) Reducing the path image to a reduced pixel size of pi=p*(xi-xi-1)/(xmax-xmin),qi=q*(yi-yi-1)/(ymax-ymin) Judging a straight-line path image and a curve path image according to the change of the slope of the map image coordinate of the path image, wherein the expression of the slope is ki=(yi-yi-1)/(xi-xi-1) The change of the slope is a ═ ki-ki+1I, when the parameter a>0.08 is judged as a curve path image, when the parameter a<0.08 judges it as a straight-line path image.
The specific operation of the image transformation is as follows: the image is subjected to rotational translation change through a straight path, and the image is subjected to bending change through a curved path. The expression of the rotational-translational change is X0=Xcosθ+Ysinθ+x,Y0=-Xsinθ+Ycosθ+y,θ=tankiPair (x) when bending changesi-1,yi-1),(xi,yi),(xi+1,yi+1) Three points are fitted to obtain a fitting circle center (x)0,y0) And fitting circle radius r0,(xi-1,yi-1),(xi+1,yi+1) The central angle formed by the center of the circle is theta0The expression for the change in curvature is:
Figure GDA0003643603040000021
Y0=q*atan2((Y-y),(X-x))/θ0(ii) a In the formula, X0The abscissa of the image after the rotational translation change is adopted, X is the data pixel abscissa of the path image, X is the abscissa of the path image in the background image, and Y is the abscissa of the path image0The image ordinate after the rotational translation change is the data pixel ordinate of the path image, Y is the ordinate of the path image in the background image.
Compared with the prior art, the invention has the following beneficial effects: the GPS data is converted into map image coordinates, each map image coordinate corresponds to a two-dimensional array of an image, the two-dimensional arrays of the images are subjected to image transformation relative to the corresponding map image coordinates, and a background image is added. This approach is less costly, faster than video recorders, and more reliable than simple track apps.
Drawings
FIG. 1 example 1 image data fused with GPS data;
FIG. 2 example 2 image data fused with GPS data;
FIG. 3 records video images of a path;
fig. 4 is a diagram showing effects obtained by the path recording method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
Referring to fig. 1 and 2, the existing track recording products in the market can only simply record the whole track of the path, and cannot describe the local information of the path, and referring to fig. 3, the way of recording the path by video cannot reflect the whole track.
The invention relates to a path recording method based on image transformation, which puts road surface image information on a map through image transformation, thus having detailed information of an overall track and a road surface. The invention relates to a path recording method based on image transformation, which comprises the following steps:
1) shooting through a mobile phone or a digital camera, and collecting image data fused with GPS data;
2) separating the GPS data from the image data to obtain a two-dimensional array of image data corresponding to each GPS data; and when the GPS geographic position data is separated, the original data function of the image is read through JavaScript to expand the GPS geographic position data.
3) And converting the GPS data into map image coordinates, and calling an API (application program interface) of the map to realize the conversion between the image coordinate system and the world coordinate system. And enabling each map image coordinate to correspond to a two-dimensional array of the image.
4) And carrying out image transformation relative to the corresponding map image coordinates on the two-dimensional array of the image and adding a background image:
when the images are converted, the straight path changes the images in a rotating and translating mode, and the curved path changes the images in a bending mode.
The background image is added according to a plane map which is preset and drawn by the maximum value and the minimum value of the GPS data, the background image can be added firstly, then the two-dimensional array of the image is subjected to image transformation relative to the coordinate of the corresponding map image, and each coordinate and the corresponding image are processed in a circulating way; or, firstly, the two-dimensional array of the image is subjected to image transformation relative to the coordinates of the corresponding map image, so as to circularly process each coordinate and the corresponding image, and then the background image is added.
5) And printing the image which is added with the background image and is transformed to obtain a path record image.
Because the track consists of straight lines and curves, the invention performs rotational translation change on the image aiming at a straight path and performs bending change on the image aiming at a curved path, thereby describing the detailed information and the overall track of all paths.
This approach is less costly, faster than video recorders, and more reliable than simple track apps.
As can be seen from fig. 4, the effect graph obtained by the present invention has both the entire path information and the partial path information.
The foregoing is considered as illustrative of the preferred embodiments of the invention and is not intended to be limiting thereof, it being understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. A path recording method based on image transformation is characterized by comprising the following steps:
1) collecting path image data containing GPS data;
2) separating the GPS data from the image data to obtain image data of each GPS data corresponding to one path image;
3) converting GPS data into map image coordinates, wherein each map image coordinate corresponds to image data of one path image;
4) performing image transformation corresponding to the map image coordinates on the image data of the path image and adding a background image;
the specific operation of the image transformation is as follows: the image is subjected to rotation translation change through a straight path, and the image is subjected to bending change through a curved path;
the expression of the rotational-translational change is X0=Xcosθ+Ysinθ+x,Y0=-Xsinθ+Ycosθ+y,θ=tankiPair (x) when bending changesi-1,yi-1),(xi,yi),(xi+1,yi+1) Three points are fitted to obtain a fitting circle center (x)0,y0) And fitting circle radius r0,(xi-1,yi-1),(xi+1,yi+1) The central angle formed by the center of the circle is theta0The expression for the change in bending is:
Figure FDA0003643603030000011
Y0=q*atan2((Y-y),(X-x))/θ0(ii) a In the formula, X0The abscissa of the image after the rotational translation change is adopted, X is the data pixel abscissa of the path image, X is the abscissa of the path image in the background image, and Y is the abscissa of the path image0The image ordinate is the image ordinate after the rotation translation change, Y is the data pixel ordinate of the path image, and Y is the ordinate of the path image in the background image;
from map image coordinates (x) of the path imagei,yi) Determining the position x-p x of the path image in the background imagei/(xmax-xmin),y=q*yi/(ymax-ymin) In the formula, xmin,xmax,ymin,ymaxThe pixel size is p x q which is the maximum value and the minimum value of the map image coordinate;
then the map image coordinate change (x) of the path imagei-xi-1,yi-yi-1) Reducing the path image to a reduced pixel size of pi=p*(xi-xi-1)/(xmax-xmin),qi=q*(yi-yi-1)/(ymax-ymin) Judging a straight-line path image and a curve path image according to the slope change of the map image coordinate of the path image, wherein the expression of the slope is ki=(yi-yi-1)/(xi-xi-1) The change of the slope is a ═ ki-ki+1I, when the parameter a>0.08 is judged as a curve path image, and when the parameter a<0.08 judges as a straight path image;
5) and printing the image which is added with the background image and is transformed to obtain a path record image.
2. The image-transformation-based path recording method according to claim 1, characterized in that: the path image data containing the GPS data in the step 1) is obtained by shooting through a mobile phone or a digital camera.
3. The image-transformation-based path recording method according to claim 1, characterized in that: and 2) expanding the GPS geographic position data through a function of reading original data of the image by JavaScript when the GPS data is separated from the image data.
4. The image-transformation-based path recording method according to claim 1, characterized in that: and when the GPS data is converted into the map image coordinate, the conversion relation between the image coordinate system and the world coordinate system is utilized to call the API interface of the map for realization.
5. The image-transformation-based path recording method according to claim 1, characterized in that: in the step 4), a background image is added firstly, and then image transformation relative to the corresponding map image coordinate is carried out on the image data of the path image, so that each coordinate and the corresponding image are processed in a circulating manner; alternatively, image data of the route image is first subjected to image transformation with respect to the coordinates of the corresponding map image, each coordinate and the corresponding image are processed in a loop, and then the background image is added.
6. The image transformation-based path recording method according to claim 1 or 5, wherein the background image is added according to a planar map preset and drawn by maximum and minimum values of GPS data.
CN201910160973.4A 2019-03-04 2019-03-04 Path recording method based on image transformation Active CN109856657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910160973.4A CN109856657B (en) 2019-03-04 2019-03-04 Path recording method based on image transformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910160973.4A CN109856657B (en) 2019-03-04 2019-03-04 Path recording method based on image transformation

Publications (2)

Publication Number Publication Date
CN109856657A CN109856657A (en) 2019-06-07
CN109856657B true CN109856657B (en) 2022-06-21

Family

ID=66899687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910160973.4A Active CN109856657B (en) 2019-03-04 2019-03-04 Path recording method based on image transformation

Country Status (1)

Country Link
CN (1) CN109856657B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429549B (en) * 2020-03-02 2023-08-01 北京梧桐车联科技有限责任公司 Route image generation method, device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487711A (en) * 2008-01-18 2009-07-22 华晶科技股份有限公司 Devices and methods with image track record displaying, browsing and navigating function
JP2009223220A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
JP2009223213A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
CN101867730A (en) * 2010-06-09 2010-10-20 马明 Multimedia integration method based on user trajectory
JP2011043871A (en) * 2009-08-19 2011-03-03 Nikon Systems Inc Image display method, program, and image display device
CN102158644A (en) * 2009-12-25 2011-08-17 卡西欧计算机株式会社 Image synthesizing apparatus and image synthesizing method
CN102162735A (en) * 2010-02-23 2011-08-24 王昊 Method, system and mobile communication terminal for obtaining travelling route through image data
CN102680992A (en) * 2012-06-05 2012-09-19 代松 Method for utilizing video files containing global positioning system (GPS) information to synchronously determine movement track
CN107547783A (en) * 2016-06-27 2018-01-05 卡西欧计算机株式会社 Display device, display methods, recording medium and display system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487711A (en) * 2008-01-18 2009-07-22 华晶科技股份有限公司 Devices and methods with image track record displaying, browsing and navigating function
JP2009223220A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
JP2009223213A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
JP2011043871A (en) * 2009-08-19 2011-03-03 Nikon Systems Inc Image display method, program, and image display device
CN102158644A (en) * 2009-12-25 2011-08-17 卡西欧计算机株式会社 Image synthesizing apparatus and image synthesizing method
CN102162735A (en) * 2010-02-23 2011-08-24 王昊 Method, system and mobile communication terminal for obtaining travelling route through image data
CN101867730A (en) * 2010-06-09 2010-10-20 马明 Multimedia integration method based on user trajectory
CN102680992A (en) * 2012-06-05 2012-09-19 代松 Method for utilizing video files containing global positioning system (GPS) information to synchronously determine movement track
CN107547783A (en) * 2016-06-27 2018-01-05 卡西欧计算机株式会社 Display device, display methods, recording medium and display system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于路径的图像变形算法;杨刚 等;《贵州工业大学学报(自然科学版)》;20020831;第31卷(第4期);正文第93-99页 *

Also Published As

Publication number Publication date
CN109856657A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
US9710898B2 (en) Image synthesis utilizing an active mask
JP6819801B2 (en) Image processing device, image processing method, and image processing program.
US8189031B2 (en) Method and apparatus for providing panoramic view with high speed image matching and mild mixed color blending
US10719913B2 (en) Content aware sampling during patch synthesis
CN109478347A (en) Image processing apparatus and image processing method
US20130287304A1 (en) Image processing device, image processing method, and program
CN111046752B (en) Indoor positioning method, computer equipment and storage medium
US10872456B2 (en) Image processing device and image processing method
CN103440318A (en) System for identifying sights of mobile terminal
CN109856657B (en) Path recording method based on image transformation
CN112270755B (en) Three-dimensional scene construction method and device, storage medium and electronic equipment
WO2018176929A1 (en) Image background blurring method and apparatus
CN111062875B (en) Coordinate conversion method and device for air panoramic roaming data
WO2022116772A1 (en) Video clipping method and apparatus, storage medium, and electronic device
CN109496325A (en) Image processing apparatus and image processing method
CA3120669A1 (en) Method and device for planning sample points for surveying and mapping, control terminal and storage medium
US20230290061A1 (en) Efficient texture mapping of a 3-d mesh
US11127199B2 (en) Scene model construction system and scene model constructing method
CN112565890A (en) Video clipping method and device, storage medium and electronic equipment
CN114359392B (en) Visual positioning method, device, chip system and storage medium
CN116311135A (en) Data dimension reduction method, data dimension reduction system and controller for semantic information
CN113297344B (en) Three-dimensional remote sensing image-based ground linear matching method and device and ground object target position positioning method
CN115393655A (en) Method for detecting industrial carrier loader based on YOLOv5s network model
US9898486B2 (en) Method, a system, an apparatus and a computer program product for image-based retrieval
CN114820748A (en) Full-view-angle characteristic intelligent evidence obtaining method based on panoramic data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant