Live data from Hacker News

PixQL: SQL for image processing

github.com

11–20 of 35 posts

Re: PixQL: SQL for image processing

#11
post #6

If you are going to use SQL select, why use a separate operate statement when you could just use SQL's method for this, update? For that matter, if you are going to use SQL syntax, I would imagine you would want to keep one of the main features, which is joining of datasets. Being able to join an image with itself in some manner (or another image...), would be really useful. Instead of globals, use the images as tabl…

There are lots of fun things you can do with a few gigs of images and an inverted index.

Re: PixQL: SQL for image processing

#12
Wouldn't it be easier to use JavaScript?

    PixQL: SELECT WHERE COLOR = #FF0000FF; OPERATE SET COLOR = #00FF00FF
    JS   : if (rgba=='FF0000FF') rgba='00ff00ff'

    PixQL: OPERATE SET G = R
    JS   : g=r

    PixQL: SELECT WHERE ROW % 100 = 0 OR COL % 100 = 0; OPERATE SET COLOR = WHITE
    JS   : if (!(row%100) || !(col%100)) rgba="ffffffff"

Re: PixQL: SQL for image processing

#13

Wouldn't it be easier to use JavaScript? PixQL: SELECT WHERE COLOR = #FF0000FF; OPERATE SET COLOR = #00FF00FF JS : if (rgba=='FF0000FF') rgba='00ff00ff' PixQL: OPERATE SET G = R JS : g=r PixQL: SELECT WHERE ROW % 100 = 0 OR COL % 100 = 0; OPERATE SET COLOR = WHITE JS : if (!(row%100) || !(col%100)) rgba="ffffffff"

No I'm pretty sure it would be easier (aka shorter) using 7zipped brainfuck.

Re: PixQL: SQL for image processing

#14
post #7

Does this have any practical use? It seems like the image equivalent of treating an HTML file as a huge string of characters -- instead of as the representation of a DOM tree. Which makes very little sense. Plus, you seldom want to do trivial things like selecting red pixels and flipping their color to green. You want to select red eyes and flip those to their correct color.

I find this interesting, but I also would like to see more complex use cases. For example using using some kind of select union on several images to output a synthetic image highlighting differences or similarities?

Same here. A more complex exemple/case study would be great.

Re: PixQL: SQL for image processing

#17

Does this have any practical use? It seems like the image equivalent of treating an HTML file as a huge string of characters -- instead of as the representation of a DOM tree. Which makes very little sense. Plus, you seldom want to do trivial things like selecting red pixels and flipping their color to green. You want to select red eyes and flip those to their correct color.

Declarative language seems appropriate for image manipulation, at least for selecting an area for operation and then running a kernel over it. It would be interesting to see how one could implement, let's say, luminance calculation (any type) or anything that needs to go back and forth over pixels. Also, pixels which aren't 24-bit per pixel, but more.

Re: PixQL: SQL for image processing

#19
I love this! Now all we need is some higher level DRAW operations (draw a line from here to there, draw a piece of rendered text here) and we can glue PixQL and ChartSQL together to implement SQL query result visualization to bitmaps completely in SQL (without going through SVG).

PS: Under which license is the PixSQL code available?

Re: PixQL: SQL for image processing

#20
So how do i blur an image, probably its not possible with this kind of SQL language, right? Or can you do something like this:

SELECT *: OPERATE SET COLOR AVG(ROW[-1], ROW[0], ROW[+1]))

To apply a 1 pixel horizontal blur?

Post reply on HN