2D Pixel coordinate mapping tool for images

@Changchung ,
Your preview doesn’t look very uniform, but I can’t tell if it actually looks that way in the picture you used to map. It should be mostly OK for patterns even if it’s a little off.

If you post the image you used to map, and the text of your pixel map coordinates, any of us can put these into the pixel mapper tool and help troubleshoot the map itself.

Pixelblaze V2 didn’t ship with many patterns that used render2D and could take advantage of the pixel map. Give it a try with “cube fire”, or some of the 2D patterns from the pattern site. Very old 2D patterns calculated the coordinates via pattern code, and assumed regular matrix configurations so won’t work with your sign. Look for “render2D” in the code.

2 Likes

Thanks Ben. Here is the picture and code that I am getting.

[
[232,252],
[388,248],
[586,256],
[936,294],
[1378,297],
[1626,267],
[2425,309],
[2631,278],
[2977,294],
[3476,290],
[224,408],
[681,423],
[921,438],
[1374,476],
[1584,442],
[2250,393],
[2741,400],
[2985,457],
[3115,396],
[3450,457],
[190,636],
[651,647],
[990,598],
[1252,587],
[1588,625],
[2254,564],
[2414,594],
[2578,583],
[2760,590],
[2985,644],
[3217,537],
[3301,640],
[3484,636],
[178,826],
[655,838],
[1134,697],
[1572,788],
[2262,777],
[2726,788],
[2997,819],
[3442,800],
[152,956],
[323,967],
[517,975],
[1131,982],
[1123,845],
[1584,986],
[1725,963],
[1892,975],
[2029,967],
[2269,979],
[2753,963],
[2993,979],
[3438,979]
]


Her

Hmm, I think the forum might have resized your image - it’s only showing up at 1920x662 pixels. If I double it, it’s close, but not quite. Whats the resolution of your source image?

It looks like the clicks/points aren’t on-center. The back of the D looks off a bit. Still, it’s close enough you’ll get some nice 2D effects from it. You could try mapping it again, just be sure to click right in the center of the LED each time - undo if needed to adjust.

1 Like

I am getting this with the firecube after saving the map code.

That looks correct to me.

Try this code

That’s not in the pattern library (yet), but does the KITT scan with 2D. Compare that to the normal KITT pattern (which would trace out each letter back and forth)

2 Likes

Yep, looks about right. You can also try “Red-Green XY 2D Sweep”
Red-Green XY 2D Sweep.epe (3.1 KB)

You could add a fake pixel to the map to lock in the aspect ratio to a square. .e.g add [3484,3484] at the end of your list. Don’t forget to add a comma, its sneakily absent on that last entry.

2 Likes

Hello guys. Sorry for the delay. This mapping is ok?

Just wanted to be sure you’re clicking on the image in the order that the pixels are wired, right? I am seeing some of the wires inside and wondering if you were marking them all, but not in their wiring order. For example, I couldn’t tell if a wire is directly connecting pixels numbered 14 and 15:

2D Pixel coordinate mapping tool for images - News and Announcements - ElectroMage Forum 2021-09-27 17-03-45

If you can post a video of the pattern Wizard included - Red-Green XY 2D Sweep.epe - that would be the most definitive answer as to whether it seems to be mapped correctly.

2 Likes

@jeff is right, you need to click on them in order. That should be listed clearly too on that page.

You need to start on the first pixel and click on them in order. Not just across the board, but the way the wiring goes. Otherwise it’ll be lighting up the wrong light and nothing will look right.

1 Like

@jeff jeff Ok. I understand now. I was selecting the Leds wrong. I will try it again.

@Scruffynerf Ok. Thanks. I will try it again and post the results.

Good morning again everyone. It is working know. I was making the mapping wrong.

Thanks everybody

@Scruffynerf The Kitt 2d effect is working just fine. Thanks a lot…

2 Likes

@jeff nice write up on mapping:. intro_to_mapping.md

I’d link to it, but unsure which link to use. @wizard?

Hopefully with the above discussion/confusion, some more “howto” will be added as well, including linking to the tool here.

1 Like

Thanks! I appreciate you noticing!

This mapping content’s been live here for a little over a year, but one effort I’ve been trying to support is unifying the navigation/cohesion of bhencke.com/pixelblaze, the github repos, and everything that lives on electromage.com. Within a few weeks, I’d like to see much of the “how to” type content fully migrated from bhencke.com/pixelblaze to electromage.com. It probably doesn’t have a durable, linkable home until then.

However, linking to it in it’s github.com/simap/pixelblaze/guides/ home is likely to be durable for quite some time, it’ll just be github markdown there, whereas it’ll be rendered into a cohesive nav experience when it gets integrated with electromage.com/setup/

2 Likes

Wow - that’s an awesome 2D version of the KITT pattern - discovered from the link in this thread. that one is the best!

2 Likes

It was a group effort. @zranger1 , @jeff and myself. Good example of the power of users collaborating. I’m hopeful that we can alter most of the current patterns in PB library to be more universal (map based).

3 Likes

2 posts were split to a new topic: New to pixel mapping - map a cylinder

This looks like an awesome tool! Is there an existing pixelblaze pattern that lights each led up sequentially as instructed on the 3d mapper page? Thanks!

EDIT: I found this, but haven’t tried it out yet: https://forum.electromage.com/t/blinkfade-in-cube-frame/1280/13

1 Like

I need 16x16 coordinates, not in pixels. So tiled coordinates. not pixel coordinates.

@LilkaEleniak - just so I understand, are you looking to control specific pixels via their [x, y] coordinate in a 16x16 matrix, where x and y are integers?

And if so, is the matrix not evenly spaced, hence why you were trying to use (or at least replying in) this thread about the picture annotation point-clicking tool?