Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(214)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 5528071: code review 5528071: graphics/convolve: expose ConvolvePoint

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by crawshaw1
Modified:
13 years, 11 months ago
Reviewers:
nigeltao
CC:
golang-dev
Visibility:
Public.
graphics/convolve: expose ConvolvePoint

Patch Set 1 #

Patch Set 2 : diff -r fccf2bd86494 https://crawshaw%40google.com@code.google.com/p/graphics-go/ #

Patch Set 3 : diff -r fccf2bd86494 https://crawshaw%40google.com@code.google.com/p/graphics-go/ #

Total comments: 2

Patch Set 4 : diff -r fccf2bd86494 https://crawshaw%40google.com@code.google.com/p/graphics-go/ #

Total comments: 12

Patch Set 5 : diff -r 1c2e9ddd42b8 https://crawshaw%40google.com@code.google.com/p/graphics-go/ #

Total comments: 1
Created: 13 years, 11 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+553 lines, -247 lines) Patch
M graphics/blur.go View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M graphics/convolve/Makefile View 1 1 chunk +1 line, -0 lines 0 comments Download
M graphics/convolve/convolve.go View 1 2 3 3 chunks +109 lines, -207 lines 1 comment Download
M graphics/convolve/convolve_test.go View 1 2 3 4 4 chunks +125 lines, -36 lines 0 comments Download
A graphics/convolve/separable.go View 1 2 3 4 1 chunk +269 lines, -0 lines 0 comments Download
A graphics/convolve/separable_test.go View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
Total messages: 6
|
crawshaw1
Hello nigeltao@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://crawshaw%40google.com@code.google.com/p/graphics-go/
14 years ago (2012年01月11日 03:27:51 UTC) #1
Hello nigeltao@golang.org (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://crawshaw%40google.com@code.google.com/p/graphics-go/ 
Sign in to reply to this message.
nigeltao
API looks reasonable. I feel like there exists a nice design somewhere that unifies all ...
14 years ago (2012年01月11日 05:47:28 UTC) #2
API looks reasonable. I feel like there exists a nice design somewhere that
unifies all these image transformations, but I'm happy to get there by
evolutionary steps.
http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile
File graphics/convolve/Makefile (right):
http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile#ne...
graphics/convolve/Makefile:10: separable.go\
Forget to "hg add separable.go" (and possibly separable_test.go)?
Sign in to reply to this message.
crawshaw1
PTAL http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile File graphics/convolve/Makefile (right): http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile#newcode10 graphics/convolve/Makefile:10: separable.go\ On 2012年01月11日 05:47:28, nigeltao wrote: > Forget ...
13 years, 12 months ago (2012年01月15日 23:42:20 UTC) #3
PTAL
http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile
File graphics/convolve/Makefile (right):
http://codereview.appspot.com/5528071/diff/4001/graphics/convolve/Makefile#ne...
graphics/convolve/Makefile:10: separable.go\
On 2012年01月11日 05:47:28, nigeltao wrote:
> Forget to "hg add separable.go" (and possibly separable_test.go)?
Done.
Sign in to reply to this message.
nigeltao
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go File graphics/convolve/convolve_test.go (right): http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go#newcode26 graphics/convolve/convolve_test.go:26: desc: "identity", k doesn't look like an identity matrix ...
13 years, 12 months ago (2012年01月16日 05:18:09 UTC) #4
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go
File graphics/convolve/convolve_test.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test....
graphics/convolve/convolve_test.go:26: desc: "identity",
k doesn't look like an identity matrix to me.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test....
graphics/convolve/convolve_test.go:145: []float64{0, 1, 0})
Add a ",\n" before the ")".
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go
File graphics/convolve/separable.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:15: // kernel. x and x are the per-axis weights.
Each slice must be the same
s/x and x/x and y/
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:21: //		[]float64{1, 2, 1})
Add a ",\n" before the ")".
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:183: buf := k.buildBuf(bounds, src)
So, if the src is 1000x1000, you'll build a 1000x1000 buffer even if the kernel
is 3x3?
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable_test.go
File graphics/convolve/separable_test.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable_test...
graphics/convolve/separable_test.go:19: []float64{0, 1, 0})
Add a ",\n" before the ")".
Sign in to reply to this message.
crawshaw1
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go File graphics/convolve/convolve_test.go (right): http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go#newcode26 graphics/convolve/convolve_test.go:26: desc: "identity", On 2012年01月16日 05:18:10, nigeltao wrote: > k ...
13 years, 11 months ago (2012年01月26日 23:27:45 UTC) #5
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test.go
File graphics/convolve/convolve_test.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test....
graphics/convolve/convolve_test.go:26: desc: "identity",
On 2012年01月16日 05:18:10, nigeltao wrote:
> k doesn't look like an identity matrix to me.
Done.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/convolve_test....
graphics/convolve/convolve_test.go:145: []float64{0, 1, 0})
On 2012年01月16日 05:18:10, nigeltao wrote:
> Add a ",\n" before the ")".
Done.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go
File graphics/convolve/separable.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:15: // kernel. x and x are the per-axis weights.
Each slice must be the same
On 2012年01月16日 05:18:10, nigeltao wrote:
> s/x and x/x and y/
Done.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:21: //		[]float64{1, 2, 1})
On 2012年01月16日 05:18:10, nigeltao wrote:
> Add a ",\n" before the ")".
Done.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable.go#n...
graphics/convolve/separable.go:183: buf := k.buildBuf(bounds, src)
On 2012年01月16日 05:18:10, nigeltao wrote:
> So, if the src is 1000x1000, you'll build a 1000x1000 buffer even if the
kernel
> is 3x3?
Yes, ConvolvePoint on a separable kernel is not a good idea.
I could implement this as a traditional convolution (i.e. build the full
matrix). Another possibility is designing it into the API:
interface Kernel {
 With(image.Image) Convolve
}
interface Convolve {
 Convolve(dst draw.Image)
 ConvolvePoint(x, y int) color.Color)
}
Not sure if it pulls its weight.
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable_test.go
File graphics/convolve/separable_test.go (right):
http://codereview.appspot.com/5528071/diff/3/graphics/convolve/separable_test...
graphics/convolve/separable_test.go:19: []float64{0, 1, 0})
On 2012年01月16日 05:18:10, nigeltao wrote:
> Add a ",\n" before the ")".
Done.
Sign in to reply to this message.
nigeltao
LGTM. http://codereview.appspot.com/5528071/diff/12001/graphics/convolve/convolve.go File graphics/convolve/convolve.go (right): http://codereview.appspot.com/5528071/diff/12001/graphics/convolve/convolve.go#newcode38 graphics/convolve/convolve.go:38: RGBA(dst, src *image.RGBA) I think that the methods ...
13 years, 11 months ago (2012年01月30日 06:14:56 UTC) #6
LGTM.
http://codereview.appspot.com/5528071/diff/12001/graphics/convolve/convolve.go
File graphics/convolve/convolve.go (right):
http://codereview.appspot.com/5528071/diff/12001/graphics/convolve/convolve.g...
graphics/convolve/convolve.go:38: RGBA(dst, src *image.RGBA)
I think that the methods should be called ConvolveRGBA and ConvolvePointRGBA.
The type should probably also be called KernelRGBA.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /