Search found 68 matches
- Feb 27th, '16, 15:27
- Forum: Projects
- Topic: Substring matching
- Replies: 2
- Views: 7251
Re: Substring matching
Thanks, John! I've shared your idea (and project) with Yolanda and Jakita at Spelman.
- Jan 27th, '16, 23:10
- Forum: Projects
- Topic: Substring matching
- Replies: 2
- Views: 7251
Substring matching
My colleagues at Spelman wanted to see that we could do more traditional algorithms in GP, so I coded the below as an example: Get values for n and m, the size of the text and the pattern, respectively. Get values for both the text T1T2…Tn and pattern matching P1P2…Pn. Set k, the starting location f...
- Jan 27th, '16, 23:08
- Forum: Projects
- Topic: Red Eye Removal
- Replies: 1
- Views: 6710
Red Eye Removal
This one is interesting because it requires a bit of searching to find the eye pixels and then find the red, so it's a more complex algorithm than we usually do in MediaComp.
You'll need the pixels extension to get the X and Y of the pixel.
You'll need the pixels extension to get the X and Y of the pixel.
Re: Chromakey
Short, intuitive -- but surprisingly, not general. In the book, we go through various backgrounds and come up with short rules for them. Most green backgrounds actually have a lot of blue in them, too, so g > b + r isn't a good rule for the green background. Agreed -- having to use indices makes it ...
Chromakey
Now I can do Chromakey in GP! Here's the source image, me (a long time ago) in front of a blue background: blue-mark.png Here's the moon background source: moon.png Here's the script that walks through the pixels and swaps in the moon for a very blue pixel: chromakey.png And here's the result: mark-...
- Dec 18th, '15, 15:18
- Forum: Fixed Bugs
- Topic: Change definition of pixels in AuthoringSpec? [FIXED]
- Replies: 1
- Views: 9192
Change definition of pixels in AuthoringSpec? [FIXED]
To select the bitmap for pixels, if not the implicit receiver, would be nice to have the pop-up menu of images:
Code: Select all
(array 'r' 'self_getPixels' 'pixels : from _' 'menu.imageMenu')
- Dec 18th, '15, 15:04
- Forum: Bugs
- Topic: Let in 0.44?
- Replies: 1
- Views: 5799
Let in 0.44?
I can't find the Let block in 0.44. I can make one if I type it, and if I type it, the blocks palette turns to the "Variables" tab. But the Let block isn't there.
- Dec 18th, '15, 14:29
- Forum: Bugs
- Topic: Names and images, images and costumes
- Replies: 1
- Views: 5796
Names and images, images and costumes
If I play with my edge detection code a few times, I end up with an images tab that looks like this: lots-images.png I'm not sure what I'd do with all these images. (And if I delete one by name, all the images by that name are deleted.) I could select them from the pop-up menus on some blocks, but s...
- Dec 18th, '15, 03:37
- Forum: Projects
- Topic: Both way edge detection and summing
- Replies: 0
- Views: 6538
Both way edge detection and summing
I rewrote John's edge detection (sketch) project, to do row-major then save the resultant image, then column-major then save the resultant image, and then blend the two images. I created several new blocks to make this work (like getting and setting color from a pixel, averaging two colors), so thos...
- Dec 17th, '15, 21:47
- Forum: Extending GP
- Topic: Requesting 3 new lines
- Replies: 1
- Views: 9573
Requesting 3 new lines
I request the addition of four lines to Colors.gp -- creating getRed, getGreen, getBlue, and getAlpha as synonyms for r, g, and b in color. (I don't really need getAlpha, but it seems like a natural.) // Color defineClass Color r g b a method red Color { return r } method green Color { return g } me...