Github user tomasatdatabricks commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20168#discussion_r160303763
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/image/ImageSchema.scala 
---
    @@ -143,12 +174,12 @@ object ImageSchema {
     
           val height = img.getHeight
           val width = img.getWidth
    -      val (nChannels, mode) = if (isGray) {
    -        (1, ocvTypes("CV_8UC1"))
    +      val (nChannels, mode: Int) = if (isGray) {
    --- End diff --
    
    The decode function still only handles  unsigned bytes. The intention of 
this PR was only to add support for conversions between ImageSchema struct and 
numpy arrays and vice versa. Such use case occurs e.g. if you want to store 
images that have been preprocessed to be used by TF model (e.g. normalized). 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to