Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.

python cv_image support for gzip #125

@spotiris

Description

@spotiris

I want to be able to easily navigate in python some datasets that are the result of leafy-dataset-query (gzipped).
Because the File objects in python are standard it should be simple to do so:
with gzip.open(filename, 'rb') as f: snark.imaging.cv_image.read(f)

However there are two issues:

  1. leafy-dataset-query has a custom header
  2. for some reason using np.fromfile(f, ...) doesn't give the right data out, however np.frombuffer(read(f, ...)) does

I have addressed these and tested on gzip'd and raw .bin files.
Patch here: https://pastebin.com/2ire5fq0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions