Skip to content

Commit

Permalink
added the files to previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlib committed Dec 21, 2024
1 parent 6462f7b commit f4cc46e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ py_bind/wheelhouse/*
*.pyd
*.pyc
*.so
py_bind/optv/*.html
6 changes: 3 additions & 3 deletions py_bind/optv/correspondences.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cdef class MatchedCoords:
"""
cdef:
np.ndarray[ndim=2, dtype=np.float64_t] positions
np.ndarray[ndim=1, dtype=np.int32_t] point_numbers
np.ndarray[ndim=1, dtype=np.int64_t] point_numbers
int pt

positions = np.empty((self._num_pts, 2))
Expand All @@ -98,7 +98,7 @@ cdef class MatchedCoords:

return positions, point_numbers

def get_by_pnrs(self, np.ndarray[ndim=1, dtype=np.int32_t] pnrs):
def get_by_pnrs(self, np.ndarray[ndim=1, dtype=np.int64_t] pnrs):
"""
Return the flat positions of points whose pnr property is given, as an
(n,2) flat position array. Assumes all pnrs are to be found, otherwise
Expand Down Expand Up @@ -161,7 +161,7 @@ def correspondences(list img_pts, list flat_coords, list cals,
num_cams * sizeof(coord_2d *))
frame frm

np.ndarray[ndim=2, dtype=np.int32_t] clique_ids
np.ndarray[ndim=2, dtype=np.int64_t] clique_ids
np.ndarray[ndim=3, dtype=np.float64_t] clique_targs

# Return buffers:
Expand Down
7 changes: 2 additions & 5 deletions py_bind/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"
requires = ["setuptools","numpy","cython","pyyaml"]
build-backend = "setuptools.build_meta"

[project]
name = "optv"
Expand All @@ -13,6 +13,3 @@ dependencies = [
"numpy",
"cython"
]

[tool.cibuildwheel]
before-build = "pip install numpy cython && cd py_bind && python setup.py prepare"
11 changes: 9 additions & 2 deletions py_bind/setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# -*- coding: utf-8 -*-

from distutils.core import setup
# from distutils.core import setup
import setuptools
import os
import shutil
import sys
import glob
from setuptools import Extension
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext
from Cython.Compiler import Options
import importlib
import numpy as np


# These are optional
Options.docstrings = True
Options.annotate = True


class PrepareCommand(setuptools.Command):
Expand Down

0 comments on commit f4cc46e

Please sign in to comment.