This project is read-only.

MarkerLayout Confusion

Aug 3, 2010 at 3:38 AM
I've been sitting here trying to figure out how to use the MarkerLayout program that came with Goblin 3.4. But for some reason the solution just eludes me. I'm trying to setup a marker layout with 170 markers at a resolution of 216 each, and I wanted them printed out on an A0 size sheet of paper (33.1" x 46.8"). I figured that would probably fit 10 markers x 17 markers at the given resolution. I have already generated all 170 markers with the program that came with ALVAR. So what do I do next? From here, I am lost.
Coordinator
Aug 12, 2010 at 4:10 PM
Edited Aug 12, 2010 at 4:12 PM
For example, the following code generates 7 x 4 marker array image and configuration with image size of 1080x594 (NOTE: this image size has nothing to do with the physical paper size, and you need to configure this correctly in an image viewing or editing software such as Photoshop or Paint.NET): LayoutManager layout = new LayoutManager(1080, 594, 12); layout.ConfigCenter = new Point(540, 297); int[] array1 = { 0, 1, 2, 3, 4, 5, 6 }; int[] array2 = { 7, 8, 9, 10, 11, 12, 13 }; int[] array3 = { 14, 15, 16, 17, 18, 19, 20 }; int[] array4 = { 21, 22, 23, 24, 25, 26, 27 }; int[][] marker_arrays = new int[4][]; marker_arrays[0] = array1; marker_arrays[1] = array2; marker_arrays[2] = array3; marker_arrays[3] = array4; layout.BeginCoordframe(""); for (int j = 0; j < 4; j++) { for (int i = 0; i < 7; i++) layout.AddMarker(marker_arrays[j][i], new Point(i * 162, j * 162), "raw_markers/ALVAR/MarkerData_" + marker_arrays[j][i] + ".png"); } layout.EndCoordframe(); layout.Compile(); layout.OutputImage("array.gif", ImageFormat.Gif); layout.OutputConfig("arrayConfig.xml", LayoutManager.ConfigType.ALVAR); layout.Dispose(); I'm multiplying 162 for both x, and y dimension because the marker image I'm using here is 108 pixels, and I want to have 54 white pixels between each marker. The int arrays are the marker IDs. For other parts, please read the documentation. Ohan
Coordinator
Aug 12, 2010 at 4:11 PM
By the way, the program does not support scaling up marker images, so if you want resolution of 216, you need to make sure your generated marker image has resolution of 216.