Discuss Scratch

eaglgenes101
New to Scratch
100+ posts

New color testing blocks

Heres my idea:
There are 6 blocks, each testing a pixel for the value of the color of the pixel: red, green, blue, hue, saturation, lightness.
And in the if touching color blocks, color value constraints can be set in place of single colors.

Why?

There are camera blocks in scratch. Problem is, it's very easy to make colors vary slightly in the camera, so something that might work on one camera might not work on another. And if the camera is noisy, good luck trying to pick out consistent pixel colors.

So instead of a project that requires superhuman light perception to work, you can have a project that can tolerate slight inaccuracies and differences using color ranges.
DotDash
Scratcher
1000+ posts

New color testing blocks

eaglgenes101 wrote:

Heres my idea:
There are 6 blocks, each testing a pixel for the value of the color of the pixel: red, green, blue, hue, saturation, lightness.
And in the if touching color blocks, color value constraints can be set in place of single colors.

Why?

There are camera blocks in scratch. Problem is, it's very easy to make colors vary slightly in the camera, so something that might work on one camera might not work on another. And if the camera is noisy, good luck trying to pick out consistent pixel colors.

So instead of a project that requires superhuman light perception to work, you can have a project that can tolerate slight inaccuracies and differences using color ranges.
There are no camera blocks, but there are video blocks.

My browser / operating system: MacOS Macintosh X 10.8.5, Chrome 29.0.1547.76, Flash 11.8 (release 800)
eaglgenes101
New to Scratch
100+ posts

New color testing blocks

DotDash wrote:

eaglgenes101 wrote:

Heres my idea:
There are 6 blocks, each testing a pixel for the value of the color of the pixel: red, green, blue, hue, saturation, lightness.
And in the if touching color blocks, color value constraints can be set in place of single colors.

Why?

There are camera blocks in scratch. Problem is, it's very easy to make colors vary slightly in the camera, so something that might work on one camera might not work on another. And if the camera is noisy, good luck trying to pick out consistent pixel colors.

So instead of a project that requires superhuman light perception to work, you can have a project that can tolerate slight inaccuracies and differences using color ranges.
There are no camera blocks, but there are video blocks.
Oh right. I misremembered. The basic idea still applies, though.
DadOfMrLog
Scratcher
1000+ posts

New color testing blocks

Scratch's colour-matching is already quite ‘loose’…
As it happens, I've just answered a post on exactly that topic, so take a look:
http://scratch.mit.edu/discuss/topic/13483/

It's probably still not really so good for what you're thinking, though, because the ‘boundaries’ are too rigid (if a colour is already at the bottom/top of the range, then the next one down/up will not match, even though it's right next to it…)

What you really need is some kind of edge-detection algorithm, and clever AI to process that information.
Well, I guess it depends what you have in mind, though…?


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

eaglgenes101
New to Scratch
100+ posts

New color testing blocks

DadOfMrLog wrote:

Scratch's colour-matching is already quite ‘loose’…
As it happens, I've just answered a post on exactly that topic, so take a look:
http://scratch.mit.edu/discuss/topic/13483/

It's probably still not really so good for what you're thinking, though, because the ‘boundaries’ are too rigid (if a colour is already at the bottom/top of the range, then the next one down/up will not match, even though it's right next to it…)

What you really need is some kind of edge-detection algorithm, and clever AI to process that information.
Well, I guess it depends what you have in mind, though…?
A better example would probably be this:
A project that codes in gesture recognition is hardcoded with a specific skin color. Scratch is used by people of various races, so such gesture recognition wouldn't work for some people. With ranges, however, one could code in a range of skin tones, and with pixel reading, one could put calibration into the project.
drmcw
Scratcher
1000+ posts

New color testing blocks

I too would like to see some get and set pixel type blocks however one fly in the ointment is that the coordinate system scratch uses is not pixel based. In other words coodinate location 0,0 is not a pixel location on the screen, it is in fact between pixels and so is surrounded by four pixels. Annoying isn't it?

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
eaglgenes101
New to Scratch
100+ posts

New color testing blocks

Bump
Williamja
Scratcher
65 posts

New color testing blocks

So a block kinda like this:

( (red▴) value of touching pixels)

I think that's a pretty good idea.

Last edited by Williamja (Aug. 17, 2013 02:48:11)


if <[williamja] = [awesome]> then
forever
change [game views v] by [9001]
end
else
we don't even need an else... everyone knows i'm always awesome. :)
Williamja
Scratcher
65 posts

New color testing blocks

or maybe

( (red▴) value of pixel at x: (102) y: (-37) )

Last edited by Williamja (Aug. 17, 2013 02:49:45)


if <[williamja] = [awesome]> then
forever
change [game views v] by [9001]
end
else
we don't even need an else... everyone knows i'm always awesome. :)
eaglgenes101
New to Scratch
100+ posts

New color testing blocks

Bump
PhirripSyrrip
Scratcher
500+ posts

New color testing blocks

Could make Scratch seem unnecessarily complex, which the ST want to avoid…

Also, why are you bumping this? You've already got answers

; ; ; ; ; ; ; ;You thought I'd get away from you, didn't you?!
eaglgenes101
New to Scratch
100+ posts

New color testing blocks

PhirripSyrrip wrote:

Could make Scratch seem unnecessarily complex, which the ST want to avoid…

Also, why are you bumping this? You've already got answers
All it involves is a handful of blocks and a small addition to color pickers. In fact, the six suggested blocks could be condensed down to one. Don't see how that is too complicated.
And I'm bumping so others see.

Last edited by eaglgenes101 (Aug. 20, 2013 16:00:05)

PARAPPAYEE
Scratcher
27 posts

New color testing blocks

(bump)

The Biggest Toothy Fan EVER!!!

LuckyLucky7
Scratcher
1000+ posts

New color testing blocks

PARAPPAYEE wrote:

(bump)
Bump? Why? This topic is really old. Please be constructive.

I have about 3450 posts, 90 shared projects, 180 total created/followed topics, and 425 followers.

Powered by DjangoBB