Skip to content

Conversation

k034b363
Copy link
Contributor

@k034b363 k034b363 commented Feb 4, 2024

Describe your changes
Added a function called merge_images() that takes as input a directory of images that can be merged in a series to produce one overlapping image. The images must overlap by a known (or guessed) percent, which could be decided through debugging. The function includes the option to merge images vertically or horizontally and 4 methods for handling the overlap region (stacked one on top of each other in series, randomly deciding which to go on top at each overlap, averaging pixels across each overlap region, or a weighted average that results in a gradual transition between images). Changes also include adding documentation and tests for this function.

Type of update

  • New feature or feature enhancement
  • Update to documentation

Associated issues
Issue #1436 but does not close it in case other contributors have ideas for improvement of this method.

Additional context
Another function to be added in the future will instead try to stitch images together based on feature landmarks.

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@k034b363 k034b363 added documentation Documentation issues or features new feature New feature ideas and solutions work in progress Mark work in progress labels Feb 4, 2024
@k034b363 k034b363 linked an issue Feb 4, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.98%. Comparing base (fbafe09) to head (4d9fdac).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1446   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         158      159    +1     
  Lines        6983     7048   +65     
=======================================
+ Hits         6982     7047   +65     
  Misses          1        1           
Flag Coverage Δ
unittests 99.98% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
plantcv/plantcv/transform/__init__.py 100.00% <100.00%> (ø)
plantcv/plantcv/transform/merge_images.py 100.00% <100.00%> (ø)

@k034b363 k034b363 added ready to review and removed work in progress Mark work in progress documentation Documentation issues or features labels Feb 8, 2024
@nfahlgren nfahlgren merged commit ec2e2df into main Feb 23, 2024
@nfahlgren nfahlgren deleted the 1436-merging-function branch February 23, 2024 22:59
@nfahlgren nfahlgren added this to the PlantCV v4.3 milestone Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature ideas and solutions ready to review
Projects
Status: Pull Requests
Development

Successfully merging this pull request may close these issues.

Function for merging images that overlap
2 participants