Skip to content

Commit

Permalink
update license header
Browse files Browse the repository at this point in the history
  • Loading branch information
dugalh committed Oct 25, 2023
1 parent 78f16d5 commit e738961
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 235 deletions.
19 changes: 4 additions & 15 deletions orthority/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
"""
Copyright 2021 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

import os
import pathlib
Expand Down
23 changes: 6 additions & 17 deletions orthority/camera.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
"""
Copyright 2021 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

import logging
from typing import Optional, Tuple, Union
Expand Down Expand Up @@ -523,7 +512,7 @@ def __init__(
self._dist_param = np.array([k1, k2, p1, p2, k3])

def _camera_to_pixel(self, xyz_: np.ndarray) -> np.ndarray:
# Brown model adapted from the OpenSFM implementation:
# Brown model adapted from the OpenSfM implementation:
# https://github.com/mapillary/OpenSfM/blob/7e393135826d3c0a7aa08d40f2ccd25f31160281
# /opensfm/src/bundle.h#LL299C25-L299C25.
# Works out faster than the opencv equivalent in OpenCVCamera.world_to_pixel().
Expand Down Expand Up @@ -621,7 +610,7 @@ def _get_undistort_maps(self, alpha: float) -> Tuple[Tuple[np.ndarray, np.ndarra
return undistort_maps, K_undistort

def _camera_to_pixel(self, xyz_: np.ndarray) -> np.ndarray:
# Fisheye distortion adapted from the OpenSFM implementation:
# Fisheye distortion adapted from the OpenSfM implementation:
# https://github.com/mapillary/OpenSfM/blob/7e393135826d3c0a7aa08d40f2ccd25f31160281
# /opensfm/src/bundle.h #L365.
# and OpenCV docs: https://docs.opencv.org/4.7.0/db/d58/group__calib3d__fisheye.html.
Expand Down
18 changes: 4 additions & 14 deletions orthority/cli.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
import csv
import logging
Expand Down
19 changes: 4 additions & 15 deletions orthority/enums.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
"""
Copyright 2021 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

from enum import Enum
from typing import List
Expand Down
19 changes: 4 additions & 15 deletions orthority/errors.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.


class OrthorityError(Exception):
Expand Down
22 changes: 5 additions & 17 deletions orthority/exif.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

# Adapted from the OpenSfM exif module
# https://github.com/mapillary/OpenSfM/blob/main/opensfm/exif.py
# Adapted from https://github.com/mapillary/OpenSfM/blob/main/opensfm/exif.py

import logging
from pathlib import Path
Expand Down
18 changes: 4 additions & 14 deletions orthority/io.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import csv
import json
import logging
Expand Down
19 changes: 4 additions & 15 deletions orthority/ortho.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
"""
Copyright 2021 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

import logging
import multiprocessing
Expand Down
18 changes: 4 additions & 14 deletions orthority/utils.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import cProfile
import logging
import pstats
Expand Down
15 changes: 0 additions & 15 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
18 changes: 4 additions & 14 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import csv
import json
import os
Expand Down
18 changes: 4 additions & 14 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from typing import Dict, Tuple

import numpy as np
Expand Down
18 changes: 4 additions & 14 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import copy
import logging
import shutil
Expand Down
18 changes: 4 additions & 14 deletions tests/test_exif.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pathlib import Path

from orthority.exif import Exif
Expand Down
18 changes: 4 additions & 14 deletions tests/test_io.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import csv
import json
from pathlib import Path
Expand Down
18 changes: 4 additions & 14 deletions tests/test_ortho.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Copyright 2023 Dugal Harris - dugalh@gmail.com
# Copyright 2023 Leftfield Geospatial
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
# of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import logging
from pathlib import Path
from typing import Dict, Tuple
Expand Down

0 comments on commit e738961

Please sign in to comment.