deepstack 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d3a74d72c68a1aef4f04d6b3a04d67cb26c89daf0bdfa1ba85a1cbfd904bd76
4
- data.tar.gz: 2cc1bfddab42ebbc72ef9e1a90c35cc577e5a46e0db8d3900c42bc24dd15af64
3
+ metadata.gz: 830f650f0001d9ace30cbcf6758aa58cae9d4bf7089300f0e22261e58274e1cb
4
+ data.tar.gz: 2a9b1c9d03f3c04d6f159f9216b85791904f8c279155c9142bf5248eb719769a
5
5
  SHA512:
6
- metadata.gz: b12be0063b456923b065db6d9ae277aa30a32bc2a4e1c895a646b039d4770bd36dd296effc788cb7ace506be23dd64a836d11e77210184eb278b0b82ddda1818
7
- data.tar.gz: ed627f25f85c15551b0758e9d87ea002f0cb95efdec5a6c31a92dd9a11936fc7bdddf51a570e61ebffc5995ce869c17d703df277421578428c187f7a724d64d5
6
+ metadata.gz: fc573a46b62325ef299af50d25a7c9c760df25025f87f1c8c1eb588a3ee148fceb38ace946d3d39e92236d48c96da4f474a239ecfc2821660886e6f020b77ea4
7
+ data.tar.gz: '08e0a71c109b87a81ef475aa85e8ea2750ed615adf65a03299b4b3df805911fac898597f94a4cdb5aa597fa03fab6367ccf04004c7545980e3a6b2261ff86d1d'
@@ -6,6 +6,7 @@ require_relative 'face'
6
6
  require_relative 'detection'
7
7
  require_relative 'scene'
8
8
  require_relative 'custom_model'
9
+ require_relative 'image'
9
10
  require_relative 'version'
10
11
 
11
12
  # DeepStack API
@@ -13,6 +14,7 @@ class DeepStack
13
14
  include DeepStack::Face
14
15
  include DeepStack::Detection
15
16
  include DeepStack::Scene
17
+ include DeepStack::Image
16
18
  include DeepStack::CustomModel
17
19
 
18
20
  #
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'base64'
4
+
5
+ class DeepStack
6
+ # Support Image Enhance feature
7
+ module Image
8
+ #
9
+ # Enhance image {https://docs.deepstack.cc/api-reference/index.html#image-enhance}
10
+ #
11
+ # @param [Image] image the raw image data or a File object of an image file
12
+ #
13
+ # @return [Image] the enhanced image object
14
+ # @return [nil] if failed
15
+ #
16
+ def enhance_image(image)
17
+ target = 'vision/enhance'
18
+ result = api_post(target, image)
19
+ return unless result&.dig('success') == true
20
+
21
+ Base64.decode64(result['base64'])
22
+ end
23
+ end
24
+ end
@@ -5,5 +5,5 @@
5
5
  #
6
6
  class DeepStack
7
7
  # @return [String] Version of DeepStack helper libraries
8
- VERSION = '1.5.0'
8
+ VERSION = '1.6.0'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deepstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Tanagra
@@ -21,6 +21,7 @@ files:
21
21
  - lib/deep_stack/deep_stack.rb
22
22
  - lib/deep_stack/detection.rb
23
23
  - lib/deep_stack/face.rb
24
+ - lib/deep_stack/image.rb
24
25
  - lib/deep_stack/scene.rb
25
26
  - lib/deep_stack/version.rb
26
27
  - lib/deepstack.rb