I'm working on a PHP project where I create a more readable version of a text transcript for a judicial inquiry, and one thing I'd really like to do is have photos depicting each speaker.
Some of them are public figures (I.e., well-known UK judges and lawyers; UK politicians), others are journalists, some are celebrities.
It seems like Wikipedia is the best thing to use for this (I may be wrong, however), however, I'm really unfamiliar with the MediaWiki API.
So, my questions:
Is Wikipedia the best thing to use for this task? Or is there a database of headshots somewhere with a very wide variety of subjects? If the latter, where's its API documentation?
If Wikipedia, what API call would I use for fetching an article's main image URL?
Lastly, how would I translate a string like "SIR PAUL STEPHENSON" to how it's listed in Wikipedia, i.e., "Paul_Stephenson_(police_officer)"
Note that I'm aware special cases will come up where no photo on Wikipedia exists or there needs to be disambiguation -- I'm quite aware I'll have to deal with those on a per-case basis.
Thanks!
Google images has a face filter:
https://www.google.com/search?tbm=isch&q=SIR+PAUL+STEPHENSON&tbs=itp:face
I'm not sure if you are allowed to use their API for this kind of stuff though, you need to read their TOS.
You can use the search api to find the most likely article for a name. AFAIK there is no sane API though to find the first image in the article (the images api will return the images in alphabetic order, and includes images from templates), so your best bet is to parse the HTML (the portrait is usually the first large image) or the wikitext (most infoboxes use a parameter called image). You can use the imageinfo api to get the image URL from the image page name.
All in all, you are probably better off with Flickr.
Related
I am trying to integrate Adobe Signature in PDF where end user can sign it on browser itself, I want his/her hand written signature on it. End user will use his/her mouse to draw the signature. This PDF creation is written in PHP and application contains Adobe APIs.
I referred to the Handwritten Adobe page and Adobe tags
I have also referred to Stack 1 and stack 2, not matching to my requirement.
I was able to sign the custom runtime generated PDF document using {{Sig_es_:signer1:signature}}
I checked it at several places including Stackoverflow, but i cant find any such reference document which can guide me to code for hand written signatures. i also need to understand if Hand written signatures have any limitation or drawbacks or any privacy/security issues.
Let me know if anyone knows How to proceed on this.
Draw a signature with a mouse? That will not work. I can't do that. A finger on a phone would work better. Still clumsy, but better.
Drawn signatures are old fashioned in the digital world, and require complex verifiable encryption. You would have to prove that the digital copy you have, was indeed drawn within the exact document it appears in. Digital things can, after all, be copied easily. Whenever there's a dispute you would have to prove that the signature is an inherent part of the unchangeable digital document. This is far more difficult than it seems at first. That's why it is usually quite expensive.
I would strongly advice to not go down this road. Find another solution.
You haven't explained what you want to use the signature for, which makes it difficult for me to suggest another solution, so I won't.
Re:
i also need to understand if Hand written signatures have any limitation or drawbacks or any privacy/security issues.
Yes, there are lots of limitations and drawbacks. You need to consider the issues of forgery (someone else signing as me, Larry) and non-reputability (I signed it but later claim that it wasn't me. How do you prove that it was Larry who signed it?)
There's also the overall context of the signature: what is the value of the agreement? What are the consequences of not being able to prove that the right person did sign the document?
Adobe Sign (and their competitors) have answers to all of the above. eSignatures are far more complicated than just getting something that looks like the person's signature on the PDF.
Pro-tip: how the signature looks on the PDF is the least important part of the process.
I'm currently working on a personal project for decoding a text or any object in an image.
I'm using GD library for processing image. I have access to every pixel of image and its rgb color.
My question is not about coding,I'm just looking for an algorithm to decode image,or any advise for how to do that and I don't want to use any API, I want to do it by myself.
I know that php has a face detection library, but it only recognizes faces in image, and I don't know how it does that .
for start, I assume that the object is white and the background is black (or any separate colors) .
summary : How can I define an object or a word for a php program and train it to recognize it from a picture?
You have some api which decode simple captcha like this.
Check this link : Captcha Decoded
And try with this api : http://www.opendecoder.com/api, there are many API if you search on google
The process you are trying to implement is called “optical character recognition” and there is some free software available and doing this. With this expressions, you may find more information.
You did not specify the kind of software component you are looking far, so it is hard to be more specific.
This is usually an error-prone process, but you might get better results if you can make regularity assumptions on your input, especially if you already know which character types are used in your input.
Useful starting points could be
http://jwilk.net/software/ocrodjvu
http://unpaper.berlios.de/
If converting to DJVU and using python on a UNIX system is an option for you, you might consider a the first link as a solution. Otherwise you may use the various tools supported by ocrodjvu to start your research. The second is more about pre-processing you might want to do before OCR but still might be useful if you want to implement your own procedure.
I'm doing some research before I start a project, and I want to know what the best method of going about this project is before I begin. Any help I can get would be much appreciated, and I'd be happy to provide more information if necessary.
Basically, I'll be given a number of extremely high resolution images to display to users. I want to create an interface whereby the user can scroll around the image and zoom in, as well as hover over parts of the picture and receive some information about that specific location. Also, I would really, really like it if I could do it without using Flash in any way, both because I don't like Flash and because it wouldn't work on i-devices.
Here's an example of the zooming capability that I'm looking for, and here's an example of the hover capability that I'm looking for (sorry they're both biblical manuscripts, don't mean to get religious on y'all, these were the best examples I could find!)
Anyway, so far I've found this spiffy script for zooming, but I haven't found anything for hovering yet (another example of what I'm looking for is something like when you tag someone in a picture on Facebook - if you hover over their face, their name pops up). And to make things all the more difficult, I have to figure out how to make them play nice, so zooming in doesn't break the hovering capabilities.
So my questions are...does anyone have any experience with anything like this? Do you have any suggestions for projects (open source is far preferred) that allow for this kind of thing? I'd really appreciate any help you fine people can give me! I'll be publishing my findings and code afterwards.
I think the technology behind Google Maps (and other such technology) would be the way to go. With Google Maps API you can use your own custom tiles instead of the map tiles. You could then set boundaries on the map to stop the user navigating away from your available imagery. Lastly, you can use the API to specify the coordinates for polygons on the "map". These polygons are great as the allow you to have hover/click events which should provide you the functionality you're after.
A good article I found on something similar to what you're after can be found here: http://forevermore.net/articles/photo-zoom/
Hope this provides some direction and sounds like a fun project that you're about to embark on :)
I found the exact match for what I'm looking for, it's kind of a relationship user interface, please see
http://www.corporationwiki.com/Ohio/Powell/nutrition-forum-sports-llc/50101823.aspx
Ho do I mimic that, I need to code a php aplication that retrieves relations from a database and displays them like that above, so that I have 1 (or many) center nodes, and several others around it pointing and linked to that node, displayed like that above.
Best Regards
PS: I will need to add and remove nodes "on the fly" live, like with jquery and ajax/json calls.
I see I was voted down, I'm sorry if this is not the place to ask this I will gladly retract my question. Can you then please be so kind to point me the place where to ask for this type of information instead of voting me down on my first question ever here?
Here are some suggestions, although the get more specific the comments above still apply.
Start with a simple test case, with just one centre node and a few child nodes. If something works in an easy case, move on to the next level of complexity and so on.
Whatever you try, expect the esthetics/clarity of your graph to break down when you reach a certain level of compexity - nodes will overlap, not appear where you want them, etc., so don't expect too much.
Look for a library that would help. In flash, several graph layouts must have been implemeted before. In Javascript too, there are drawing panel libraries, or you could use a library for SVG or... Look for something that suits. As a comment above says, PHP is probably not it.
Neo4J (Graph Database) is implemented in Java and should be capable of what you show in the image. I haven't had an opportunity to use it for anything, but it looks powerful, simple, and is open source (with good documentation).
Also, try doing a search for Relationship Mapping and you may find what your looking for.
I recommend GraphViz for drawing static boxes and connecting them with arrow-headed lines. It has a very simple script (the shortest one is: "start -> stop", self-explanatory).
Some years ago I've made an XML file tree visualizer in PHP:.
As the figure shown, there's some kind of HTML table-like feature to draw a node. See GraphViz Gallery for some more exciting examples.
Update: As I mentioned, it's only for static, but you can make an app very quickly which displays the stuff. I've used my XML visualizer to make drawings for documentation.
im looking for a Solution, to get a Video URL from a VideoWebsite.
Here is a sample video: XXXX
And here is the dynamic link to the video: XXX
Cause its dynamic i cant find the url, or have no clue how the urls get generated in php. I searched for php functions, but had no luck.
You would have to parse (and probably run) the actual SWF file that gets embedded and is responsible for playing the video, and see what requests it makes to get that actual content URL.
Doing this in pure PHP is a highly complex enterprise (if possible at all) and not for the faint of heart. I'm not aware of a ready-made solution that does this.
Though this doesn't answer the technical side of your question, if you're parsing videos from someone else's website, you might be best off contacting the site/content owners and asking how you can properly link to their content.
You could use this link to get the plain player SWF:
http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1946215&autostart=true
where clip_id holds the same id as seen in the url. I guess this is the best compromise as I doubt CollegeHumour wants you to get the plain movie, which also may lead to copyright issues.