hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.
https://gocv.io
Other
6.74k stars 868 forks source link

Filestorage roadmap #1208

Closed diegohce closed 2 months ago

diegohce commented 3 months ago

clean commits

deadprogram commented 3 months ago

Thank you very much for the cleanup here @diegohce

Now we probably just need to figure out the permissions on Windows for file writing. Excellent progress, I will try to take a look sometime today.

deadprogram commented 3 months ago

Please note I changed the branch for this PR to dev. :smile_cat:

diegohce commented 3 months ago

Please note I changed the branch for this PR to dev. 😸

Did I mistake the branch... again! ?

diegohce commented 2 months ago

Damn! I'm so eager for this to get to the new release!

diegohce commented 2 months ago

Would "/tmp" be a factible directory?

On Wed, Aug 28, 2024 at 4:44 AM Ron Evans @.***> wrote:

@.**** commented on this pull request.

In persistence_test.go https://github.com/hybridgroup/gocv/pull/1208#discussion_r1734159431:

@@ -0,0 +1,54 @@ +package gocv + +import (

  • "testing" +)
  • +func TestFileStorage(t *testing.T) {

  • fs := NewFileStorageWithParams("testdata/filestorage", FileStorageModeWrite|FileStorageModeFormatJson, "utf-8")

Perhaps writing the file into a temp directory would be better and would pass on Windows?

Untested:

pth := filepath.Join(os.TempDir(), "filestorage.json")fs := NewFileStorageWithParams(pth, FileStorageModeWrite|FileStorageModeFormatJson, "utf-8")

— Reply to this email directly, view it on GitHub https://github.com/hybridgroup/gocv/pull/1208#pullrequestreview-2265427783, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJCC6H6F3O7VOTIW6P5R73ZTV5XRAVCNFSM6AAAAABNFF2CQSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRVGQZDONZYGM . You are receiving this because you were mentioned.Message ID: @.***>

diegohce commented 2 months ago

sorry, I missed your code sample. I will try with that right now

On Wed, Aug 28, 2024 at 5:10 PM Diego Cena @.***> wrote:

Would "/tmp" be a factible directory?

On Wed, Aug 28, 2024 at 4:44 AM Ron Evans @.***> wrote:

@.**** commented on this pull request.

In persistence_test.go https://github.com/hybridgroup/gocv/pull/1208#discussion_r1734159431:

@@ -0,0 +1,54 @@ +package gocv + +import (

  • "testing" +)
  • +func TestFileStorage(t *testing.T) {

  • fs := NewFileStorageWithParams("testdata/filestorage", FileStorageModeWrite|FileStorageModeFormatJson, "utf-8")

Perhaps writing the file into a temp directory would be better and would pass on Windows?

Untested:

pth := filepath.Join(os.TempDir(), "filestorage.json")fs := NewFileStorageWithParams(pth, FileStorageModeWrite|FileStorageModeFormatJson, "utf-8")

— Reply to this email directly, view it on GitHub https://github.com/hybridgroup/gocv/pull/1208#pullrequestreview-2265427783, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJCC6H6F3O7VOTIW6P5R73ZTV5XRAVCNFSM6AAAAABNFF2CQSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRVGQZDONZYGM . You are receiving this because you were mentioned.Message ID: @.***>

deadprogram commented 2 months ago

Looking good now @diegohce thank you very much for adding this set of long-needed features! Now squash/merging.