简体   繁体   中英

How to plot 2-D navigation data points on a floor map using Matlab/Python?

I want to show the tracking result of my indoor localization algorithm with respect to the ground truth reference path on the floor map. The floor plan and the walking route representing the ground truth is as follows:

在此处输入图片说明

Here, the red line is the ground truth route. The right-left side of the image represents the x-axis and it is compressed (original x-axis length is much larger) owing to space. The top-bottom of the image is the y-axis and it represents precisely according to the coordinate. I want to draw the localization estimation points (2-D) on it. I tried to do it using Origin . I got the following image.

在此处输入图片说明

As seen in the figure above, the image does not resemble the floor plan precisely (using log on y-axis can reduce the dimension of y-axis but it does not yield a complete solution in my case).

To summarize:

What I have: (a) A set of 2-D coordinate points from each localization algorithm (I'm comparing my method with two other methods, so there are 3 sets of 2-D coordinate points) and (b) a floor plan image.

What I want : To plot the sets of 2-D coordinate points on the floor plan image.

If anyone could drop a sample Matlab/python code to plot the 2-D coordinates, I'd highly appreciate it.

Thank you.

To plot on top of an image, you have to provide the nessecary scaling information. This can be achieved using the image function passing x, y and C: https://de.mathworks.com/help/matlab/ref/image.html?s_tid=doc_ta

I don't know how your floor plan is scaled, but the resulting code should be something like:

image(x,y,C) % x and y provides the scaling informating, C is the image.
hold on
plot(...) % code you already have

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM