Automatic selection of control points in Matlab - image

Is there a way to select the control points automatically in Matlab instead of manually selecting them by cpselect? Thank you very much.

I just recently worked on a project where I had to do the same thing -- eventually I found that you can select control points automatically, but only if you use automatic selection to find the control points for both the unregistered and the orthophoto. (The control points used to define image transforms are stored in matrices, so if you can get your automated system to output a set of point coordinates in matrix form you can pass them to straight to cp2tform and bypass cpselect entirely.) On the other hand, cpselect stores corresponding pairs of image points using some kind of special data structure, so that I was never able to just pass it a set of control points for one image while leaving the other image blank.

I don't have the Matlab Image Processing Toolbox, but I see from the documentation that cpeselect can be called with an argument specifying the initial set of control points. Can you reduce your task to automating the creation of that initial set?

Related

How can I set the agent image order on GIS map

I am working on a supply chain network using the GIS map. The problem I am facing is the order of images on the map. As I create them from a database, I first create Stores, then DCs, and after then Trucks (inside of each DC agent). However, Stores are on top, then DCs, and then Trucks. How can I change the image order?
You can manipulate the drawing stacking sequence by amending the agent population presentations. Find them on Main (where your GIS map is), right-click them and order them as needed:
Best put the animations temporarily above each other so you can stack them as needed.

Meshlab alignment issue

When I am trying to align two point clouds in meshlab, there is an error saying No successful arc among candidate Alignment arcs. And even though the point clouds after alignment can be seen in window, I cannot save it successfully. However I try, the ply file which I save always contains only the last layer, rather than all the layers. Dose the saving failure have something to do with the process error? How can I overcome this error? I work on Ubuntu 18.04 version.
Meshlab will only export one layer when you export to any output file format. If you have several layers that should be exported to same file you need to merge the layer with the filter Flatten visible layer.
To run this filter you can click with the right mouse button on the layer list, or find it in the menu Filter->Mesh Layer->Flatten visible layer

Projecting negative coordinates inside display area

I am testing the RandomWaypointMobility with a constrained area minX=-3000m, maxX=3000m, minY=-3000m and maxY=3000m. The #displaystrings sets bgp=6000,6000. The result is that nodes in the negative part of the coordinate system are rendered outside the display/canvas area.
Are there some parameters I can use to tell OMNeT++/INET that origo for the coordinate system is at the center of the display/canvas? I have tried
*.visualizer.sceneVisualizer.sceneMaxX = 3000m
*.visualizer.sceneVisualizer.sceneMinX = -3000m
*.visualizer.sceneVisualizer.sceneMaxY = 3000m
*.visualizer.sceneVisualizer.sceneMinY = -3000m
*.visualizer.sceneVisualizer.sceneMaxZ = 3000m
*.visualizer.sceneVisualizer.sceneMinZ = -3000m
but it doesn't work as I hoped for.
I realize that for RandomWaypointMobility I can just use a constrained area with positive coordinates only, which would keep objects within the canvas. However, my next task is to pull in mobility traces that include negative coordinates. Do I need to manually shift all coordinates so they become positive and stay within the canvas/display, or is there a smarter way of doing things?
Any hints appreciated!
Thanks,
Dragos
What you set is in fact bgb=6000,6000 which sets the size of the module. There were indeed plans to add a tag called bgp directly into OMNeT++ which would introduce an offset, but at the end it was not implemented. The reason is that once you go down into that rabbit hole, you want to implement also scaling and then rotation etc. So the default display string based visualization left as simple as possible and all these transformation stuff was left for the model code.
So indeed, SceneCanvasVisualizer in INET has a viewScale and viewTranslation parameter that can be used for these purposes.

Find areas to output in pdf file

Problem: I have a scanned version of some tax report (e.g. https://docs.google.com/file/d/0B3TmJsb1vYhqclFFendvTlRoV28/edit?usp=sharing ), and I must fill it programmly. So, it`s needed to find empty areas and put to it some values in program.
Now I see only one solution - manually find coordinates of these empty areas, code it to program, and output values to these coordinates.
Is it possible to programmly find coordinates (may be by some pattern recognition or something else) of empty areas? May be use of some Ruby tools (e.g. Prawn) ?
So, there isn't complete automatic solution. I've solved this problem by searching areas to input, store its coordinates and then output to these areas

Calculate actual size needed for a MATLAB uicontrol

I'm trying to calculate the actual size needed for uicontrols in a GUI so the GUI can resize itself appropriately. My problem is that the Extent property of a uicontrol is only the text area, and I can't find a way to determine the size of the surrounding control (such as the down arrow in a popup or the margin of an edit control). Is there a way to get the size of the decorations on a control?
I saw this related question on MATLAB Answers, which looked like it ended with no solution as well.
Edit:
For example, I want to calculate how big this popup should be to avoid cutting off the contents:
uicontrol('style', 'popup', 'string', {'a long string'})
Extent only tells me how big "a long string" is, and I still don't know how big to make the popup. I want a way to determine how much extra space is needed on the user's display (without assuming which OS or font sizes they use).
You can use get(hObject,'extent') to find out how much space the string contained in the uicontrol takes up. You can see if this is larger than the uicontrol's position.
The uicontrol Position property gives you the height and width of the bounding rectangle for the control. This has always worked for me. Is there a control where this property does not provide enough information?
If the GUI you're building can be assembled exclusively from Java components, you can use MATLAB's Java integration to create and drive a window using Java Swing components (all from M-code). That sidesteps the problem entirely, since the Java layout managers can do UI layout properly.

Resources