Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

50% Positive

Analyzed from 94 words in the discussion.

Trending Topics

#brush#stroke#candidate#area#color#similarity#algorithm#each#affected#pixel

Discussion (2 Comments)Read Original on HackerNews

verdvermabout 2 hours ago
I'm curious about the greedy algorithm vs something like compressed sensing. Can you expand on the algo choice and how it works?
flinkerflitzerabout 2 hours ago
Sure!

The brush stroke accept/reject algorithm looks at the axis-aligned bounding box that surrounds each candidate brush stroke's affected area. It calculates the cumulative pixel color similarity between the input image and the painting over this area, before and after the candidate brush stroke.

Pixel color similarity is the sum of the absolute difference of each RGB color channel divided by 3.

The candidate brush stroke is accepted and kept by the painting if and only if it represents an improvement in similarity over its affected area AABB.