{"id":71,"date":"2005-05-26T22:58:33","date_gmt":"2005-05-27T03:58:33","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=71"},"modified":"2005-05-26T22:58:33","modified_gmt":"2005-05-27T03:58:33","slug":"flickr-image-region-selection","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/71\/flickr-image-region-selection\/","title":{"rendered":"Flickr Image Region Selection"},"content":{"rendered":"<p>One of the things I&#8217;ve noticed with my Image Region stuff, which I posted about recently, is that it&#8217;s slow. I didn&#8217;t really think about why: at first, a lot of it seemed to have to do with the client side XSL, or the CSS cropping of gigantic images.<\/p>\n<p>However, I&#8217;m now realizing that this is using a regex with a pretty heavy query: The kind of query that I wouldn&#8217;t want anyone to run against julie, because it would just take too long.<\/p>\n<p>The reason for this is Redland&#8217;s current REGEX implementation: It basically loads all the literals out of the store and does a regex against them after it has them, which is obviously not ideal.<\/p>\n<p>With that in mind, I tried to think of interesting queries which could be done without requiring a regex, and came up with the idea of flickr images searches: show me a closeup of all the regions in a flickr image of mine.<\/p>\n<p>So, now there&#8217;s an additional search box on my SPARQL interface: Flickr ID\/URI. It then uses the foaf:page part of the photo to query against, which is obviously much faster.<\/p>\n<p>Maybe I&#8217;ll expand this: let people put in any flickr photo ID, and display the information using XSLT against an RDF datasource, with a link to the output of the datasource. I&#8217;ve got all the tools to do it now running in Python locally, so I don&#8217;t think it would be too difficult: I would need to get some error parsing together though. I really wish I could tie PHP \/ Python code on the web together more easily though&#8230;<\/p>\n<p>Anyway, an example: <a href=\"http:\/\/flickr.com\/photos\/crschmidt\/15544106\/\">Flickr Page<\/a> to RDF generates <a href=\"http:\/\/crschmidt.net\/albums\/sparql?flickr=15544106\">Regions<\/a>.<\/p>\n<p>Try it out at <a href=\"http:\/\/crschmidt.net\/albums\/sparql\">The SPARQL search<\/a>. As always, data and query are shown inside the source of the page, at the bottom.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the things I&#8217;ve noticed with my Image Region stuff, which I posted about recently, is that it&#8217;s slow. I didn&#8217;t really think about why: at first, a lot of it seemed to have to do with the client side XSL, or the CSS cropping of gigantic images. However, I&#8217;m now realizing that this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,5,29],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-flickr","category-image-description","category-sparql"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}