Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added missing cuda imgproc standalone functions #1227

Merged

Conversation

diegohce
Copy link
Collaborator

Added functions:

AlphaComp
GammaCorrection
SwapChannels
CalcHist
CalcHist_WithParams
EqualizeHist
EvenLevels
HistEven
HistRange
BilateralFilter
BlendLinear
MeanShiftFiltering
MeanShiftProc
MeanShiftSegmentation

@deadprogram
Copy link
Member

Hello @diegohce thank you very much for another great PR.

One small problem is that I think we need both the XXX and XXXWithStream versions for each CUDA function.

Please see

gocv/cuda/arithm.go

Lines 13 to 28 in f684ee7

// Abs computes an absolute value of each matrix element.
//
// For further details, please see:
// https://docs.opencv.org/master/d8/d34/group__cudaarithm__elem.html#ga54a72bd772494ab34d05406fd76df2b6
func Abs(src GpuMat, dst *GpuMat) {
C.GpuAbs(src.p, dst.p, nil)
}
// AbsWithStream computes an absolute value of each matrix element
// using a Stream for concurrency.
//
// For further details, please see:
// https://docs.opencv.org/master/d8/d34/group__cudaarithm__elem.html#ga54a72bd772494ab34d05406fd76df2b6
func AbsWithStream(src GpuMat, dst *GpuMat, stream Stream) {
C.GpuAbs(src.p, dst.p, stream.p)
}
for an example.

@diegohce
Copy link
Collaborator Author

Hello @diegohce thank you very much for another great PR.

One small problem is that I think we need both the XXX and XXXWithStream versions for each CUDA function.

Please see

gocv/cuda/arithm.go

Lines 13 to 28 in f684ee7

// Abs computes an absolute value of each matrix element.
//
// For further details, please see:
// https://docs.opencv.org/master/d8/d34/group__cudaarithm__elem.html#ga54a72bd772494ab34d05406fd76df2b6
func Abs(src GpuMat, dst *GpuMat) {
C.GpuAbs(src.p, dst.p, nil)
}
// AbsWithStream computes an absolute value of each matrix element
// using a Stream for concurrency.
//
// For further details, please see:
// https://docs.opencv.org/master/d8/d34/group__cudaarithm__elem.html#ga54a72bd772494ab34d05406fd76df2b6
func AbsWithStream(src GpuMat, dst *GpuMat, stream Stream) {
C.GpuAbs(src.p, dst.p, stream.p)
}

for an example.

Hi @deadprogram , no problem, my bad.
I wIl fix it asap

@deadprogram
Copy link
Member

Thank you very much for the additions @diegohce now merging.

@deadprogram deadprogram merged commit 5ad6592 into hybridgroup:dev Sep 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants