Skip to content

Commit

Permalink
Merge pull request hybridgroup#136 from willdurand/dev
Browse files Browse the repository at this point in the history
Compare Mat Type directly
  • Loading branch information
deadprogram authored Mar 15, 2018
2 parents 4645cff + 45ac211 commit c0b0266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (m *Mat) SetDoubleAt3(x, y, z int, val float64) {

// ToImage converts a Mat to a image.Image.
func (m *Mat) ToImage() (image.Image, error) {
t := MatType(m.Type())
t := m.Type()
if t != MatTypeCV8UC1 && t != MatTypeCV8UC3 && t != MatTypeCV8UC4 {
return nil, errors.New("ToImage supports only MatType CV8UC1, CV8UC3 and CV8UC4")
}
Expand Down

0 comments on commit c0b0266

Please sign in to comment.