-
Notifications
You must be signed in to change notification settings - Fork 0
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
optimizations #1
Comments
i think both of those ideas would significantly speed up the convergence. as it is, the current code is not optimized for speed - it's optimized for simplicity. in the first case, you'd have to be careful: the score for one bounding box would be different than for another bounding box. so you couldn't just keep last iteration's score and compare against that - you'd need to recompute the previous image's score for each new bounding box. |
Would making the generated image the same size as the mona image remove the need for every compare to resize both images? (I am not an objective-c programmer, and I do not know the API well enough yet) (or whichever is bigger between the mona image and the canvas) This may be a bug, but if the pixel is three color channels mixed into one representation of a pixel is it correct to do a abs(505152 - 006000) ? where the red channel is 0x50 green is 0x51 blue is 0x52. Would an XOR be a better representation of the difference in channels? |
yup. resizing the Mona image for every comparison is very wasteful, time-wise. :) |
The decision and change idea (without the xor for separating color channels)
|
How would I change the image comparison to only look at the bounding box of the change in the generated image and the mona image? Something like UIRectClip ( CGRect rect ); ?
Instead of choosing the color before comparison why not make the comparison/iteration return the average color of the bounding box? (or of the center vertical and horizontal line) Including another comparison to the image would make it a 2n problem (without the optimization of the center vert/horiz line), but would this comparison be useful?
The text was updated successfully, but these errors were encountered: