Coder Social home page Coder Social logo

Comments (7)

danice avatar danice commented on July 19, 2024 1

Last version includes processing using structure panorama.

from iceautomation.

danice avatar danice commented on July 19, 2024

Thanks! I haven't use structured panoramas in ICE. As far as I undestand this is only usefull if all the pictures overlap the same exact amount and they can only follow 2 kind of order (serpentine or zig-zag).
First you should check that you are able to manually stich your images using structured panoramas.

What I would suggest is to use the normal stich with the planar camera motion option, for example to process the images of the current folder in groups of ten:
ICEAutomation process 10 --motion planarMotion

from iceautomation.

ckolluru avatar ckolluru commented on July 19, 2024

Hi, I’ve been tweaking this code to create structured panoramas. You can define the starting position and size of the grid with some FlaUI commands.

Let me know if this is still relevant for you and I can offer some help.

from iceautomation.

danice avatar danice commented on July 19, 2024

Hi, really I haven't looked well to structured panoramas. Now I can see they are very useful, and I was going to try to include them... If you can share you code I will appreciate it very much!

from iceautomation.

ckolluru avatar ckolluru commented on July 19, 2024

Hi @danice, firstly thanks for sharing this code, this is quite helpful. Here's my quick fix code that I added to Program.cs

The percentages, start location, direction and count are currently hard coded.

//Structured panorama
AutomationElement b1 = null;
do
{
      b1 = window.FindFirstDescendant(cf => cf.ByName("Structured panorama").And(cf.ByControlType(FlaUI.Core.Definitions.ControlType.Button))).AsButton();
} while (b1 == null);

 b1.Click();

//Camera motion - set to planar motion
window.FindFirstDescendant(cf => cf.ByName("Camera motion").And(cf.ByControlType(FlaUI.Core.Definitions.ControlType.Group))).FindChildAt(1).AsComboBox().Select("Planar motion").Click();

// Initial corner and direction - top left
window.FindFirstDescendant(cf => cf.ByName("Layout").And(cf.ByControlType(FlaUI.Core.Definitions.ControlType.Group))).FindChildAt(5).AsButton().Click();
window.FindFirstDescendant(cf => cf.ByName("Layout").And(cf.ByControlType(FlaUI.Core.Definitions.ControlType.Group))).FindChildAt(9).AsButton().Click();
                   
// Number of columns - 3x3
window.FindFirstDescendant(cf => cf.ByAutomationId("primaryDirectionImageCountTextBox")).AsTextBox().Enter("3");
  
//Serpentine
var radiobutton = window.FindFirstDescendant(cf => cf.ByAutomationId("serpentineRadioButton")).AsRadioButton();
radiobutton.IsChecked = true;  
 
//Overlap percentage
window.FindFirstDescendant(cf => cf.ByAutomationId("horizontalOverlapTextBox")).AsTextBox().Enter("10");
window.FindFirstDescendant(cf => cf.ByAutomationId("verticalOverlapTextBox")).AsTextBox().Enter("10");

// Go to stitch page
window.FindChildAt(14).AsButton().Click();

bool finished = false;
do{
      var window2 = app.GetMainWindow(automation);
      title = window2.Title;
      finished = title.StartsWith("U");
  } while(!finished);

// Go to crop page
window.FindChildAt(15).AsButton().Click();

finished = false;
do{
      var window2 = app.GetMainWindow(automation);
      title = window2.Title;
      finished = title.StartsWith("U");
  } while(!finished);

// Auto complete
window.FindFirstDescendant(cf => cf.ByName("Auto complete").And(cf.ByControlType(FlaUI.Core.Definitions.ControlType.Button))).AsButton().Click();

// Wait for auto complete to finish
finished = false;
do{
      var window2 = app.GetMainWindow(automation);
      title = window2.Title;
      finished = title.StartsWith("U");
} while(!finished);

from iceautomation.

ckolluru avatar ckolluru commented on July 19, 2024

Hi @danice,

I've been trying to use the latest build for a structured panorama. Here is the command I'm using from the folder with the images:

ICEAutomation.bat structure 25 *.tif --motion planarMotion --initial-corner topLeft --rows 5 --order zigzag --horizontal-overlap 10 --vertical-overlap 10

The software selects planar motion in the simple panorama window and moves on to aligning the images. In the command window, I see the following line printed thrice:

Operation is not valid due to the current state of the object.

Do you know why this might be happening? Any help would be appreciated.

Thanks,
Chaitanya

from iceautomation.

danice avatar danice commented on July 19, 2024

Hi!
It should selected the "Structured panorama" section.
You should debug the application to find why the "void SetStructurePanorama" method is not working. In visual studio code configure a launch.json settings like this

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",            
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/src/bin/Debug/netcoreapp3.1/ICEAutomation.exe",
            "args": ["structure", "25", "*.tiff",  (your image folder i.e. "C:\\Users\\<user>\\projects\\test\\img"),
                "--motion", "planarMotion",
                "--initial-corner", "topLeft", "--rows", "5", "--order", "zigzag", "--horizontal-overlap", "10", "--vertical-overlap", "10"],
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false
        }
    ]
}

from iceautomation.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.