Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

__init__.py 532 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  1. # -*- coding: utf-8 -*-
  2. # Copyright (c) 2021. Jeffrey Nirschl. All rights reserved.
  3. #
  4. # Licensed under the MIT license. See the LICENSE file in the project
  5. # root directory for license information.
  6. #
  7. # Time-stamp: <>
  8. # ======================================================================
  9. # Standard library imports
  10. # Image and array operations
  11. import cv2
  12. # Specify opencv optimization
  13. cv2.setUseOptimized(True)
  14. def to_float(img):
  15. return cv2.normalize(img.astype('float32'), None, 0.0, 1.0, cv2.NORM_MINMAX)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...