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

OCL: bilateral filter optimization (Pullreq/140319) #2612

Merged
merged 7 commits into from
Apr 22, 2014

Conversation

grkutty
Copy link
Contributor

@grkutty grkutty commented Apr 11, 2014

Optimizations for bilateral filter

check_regression=OCL_ilateral_
test_module=imgproc

@vpisarev
Copy link
Contributor

@ilya-lavrenov, could you review it, please?

uint_t diff = abs(val - val0);
float w = space_weight[k] * color_weight[SUM(diff)];
uint diff = (uint)SUM(abs(val - val0));
float w = space_weight[k] * native_exp((float)(diff * diff * as_float(gauss_color_coeff)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as_float(gauss_color_coeff) is wrong here, because gauss_color_coeff is float constant passed via compiler defines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed as_float

From: Alexander Alekhin [mailto:notifications@github.com]
Sent: Monday, April 14, 2014 7:55 AM
To: Itseez/opencv
Cc: Ravunnikutty, Girish
Subject: Re: [opencv] Pullreq/140319 bilateral b (#2612)

In modules/imgproc/src/opencl/bilateral.cl:

@@ -74,8 +75,8 @@ __kernel void bilateral(__global const uchar * src, int src_step, int src_offset

     for (int k = 0; k < maxk; k++ )

     {

         int_t val = convert_int_t(loadpix(src + src_index + space_ofs[k]));
  •        uint_t diff = abs(val - val0);
    
  •        float w = space_weight[k] * color_weight[SUM(diff)];
    
  •        uint diff = (uint)SUM(abs(val - val0));
    
  •        float w = space_weight[k] * native_exp((float)(diff * diff * as_float(gauss_color_coeff)));
    

as_float(gauss_color_coeff) is wrong here, because gauss_color_coeff is float constant passed via compiler defines.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2612/files#r11588081.

@ilya-lavrenov
Copy link
Contributor

@ilya-lavrenov
Copy link
Contributor

👍

@grkutty
Copy link
Contributor Author

grkutty commented Apr 15, 2014

Fixed the Doc issues in the build

From: Ilya Lavrenov [mailto:notifications@github.com]
Sent: Tuesday, April 15, 2014 2:43 AM
To: Itseez/opencv
Cc: Ravunnikutty, Girish
Subject: Re: [opencv] Pullreq/140319 bilateral b (#2612)

@grkuttyhttps://github.com/grkutty, please, fix http://build.opencv.org/builders/precommit_docs/builds/9687/steps/whitespace/logs/warnings%20%284%29


Reply to this email directly or view it on GitHubhttps://github.com//pull/2612#issuecomment-40463093.

@grkutty
Copy link
Contributor Author

grkutty commented Apr 16, 2014

@ilya-lavrenov Are u waiting for anything from my side for the merge of the pull request ?

@ilya-lavrenov
Copy link
Contributor

@grkutty, no, I don't have the permissions for merging, let's wait for our integration manager

@grkutty
Copy link
Contributor Author

grkutty commented Apr 18, 2014

@ilya-lavrenov The failure on dft seems unrelated to the change. Is that holding the merge ?

@apavlenko apavlenko changed the title Pullreq/140319 bilateral b OCL: bilateral filter optimization (Pullreq/140319) Apr 22, 2014
@opencv-pushbot opencv-pushbot merged commit c2f540d into opencv:master Apr 22, 2014
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.

6 participants