Commit b6dadc81 authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Merge pull request #399 from ladoramkershner/same_source

ensuring that that source image is consistent for all measure
parents 942f2e83 509cf19d
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ from plurmy import Slurm
from autocnet import Session, config
from autocnet.matcher import naive_template
from autocnet.matcher import ciratefi
from autocnet.io.db.model import Points, Images, JsonEncoder
from autocnet.io.db.model import Measures, Points, Images, JsonEncoder
from autocnet.graph.node import NetworkNode

import geopandas as gpd
@@ -230,9 +230,6 @@ def subpixel_template(sx, sy, dx, dy, s_img, d_img, image_size=(251, 251), templ

    return dx, dy, metrics

    x_shift, y_shift, strength = naive_template.pattern_match(template, image, **kwargs)
    return x_shift, y_shift, strength

def subpixel_ciratefi(sx, sy, dx, dy, s_img, d_img, search_size=251, template_size=51, **kwargs):
    """
    Uses a pattern-matcher on subsets of two images determined from the passed-in keypoints and optional sizes to
@@ -407,8 +404,7 @@ def subpixel_register_point(pointid, iterative_phase_kwargs={}, subpixel_templat
                the database.
    """
    session = Session()
    point = session.query(Points).filter(Points.id == pointid).one()
    measures = point.measures
    measures = session.query(Measures).filter(Measures.pointid == pointid).order_by(Measures.id).all()
    source = measures[0]

    sourceid = source.imageid