From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Drawing in images? Date: Thu, 27 Aug 2009 08:31:14 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251354753 12127 80.91.229.12 (27 Aug 2009 06:32:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 06:32:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 08:32:26 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgYX4-0006vK-Dc for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 08:32:26 +0200 Original-Received: from localhost ([127.0.0.1]:60290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgYX3-0002Tj-P8 for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 02:32:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgYWH-0001T6-6F for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:31:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgYWC-0001Lk-6K for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:31:36 -0400 Original-Received: from [199.232.76.173] (port=46581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgYWB-0001L8-SI for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:31:32 -0400 Original-Received: from proxy2.bredband.net ([195.54.101.72]:59196) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgYWB-0000JP-9A for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:31:31 -0400 Original-Received: from iph2.telenor.se (195.54.127.133) by proxy2.bredband.net (7.3.140.3) id 4A8FF714001BD484 for emacs-devel@gnu.org; Thu, 27 Aug 2009 08:31:28 +0200 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak1eAIrElUpT44qWPGdsb2JhbACbBwEBAQE3vC6EGgU X-IronPort-AV: E=Sophos;i="4.44,284,1249250400"; d="scan'208";a="38649955" Original-Received: from ua-83-227-138-150.cust.bredbandsbolaget.se (HELO exodia) ([83.227.138.150]) by iph2.telenor.se with ESMTP; 27 Aug 2009 08:31:28 +0200 Original-Received: from localhost.localdomain (DIR-655.lan [192.168.200.113]) (authenticated bits=0) by exodia (8.14.3/8.14.3) with ESMTP id n7R6VESK016033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 27 Aug 2009 08:31:14 +0200 In-Reply-To: (MON KEY's message of "Wed, 26 Aug 2009 20:52:23 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114670 Archived-At: MON KEY writes: >> a) use clever already existing way, unknown to me, or > > Could parts of ../lisp/textmodes/artist.el be used? > > The rectangling feature is usable for setting reasonable rhombus' > At the very least the heuristics of its rubber-banding are already available. > > BTW: This would be a _killer-feature_ if the bounding box could be rotated. > Moreso, with key commands e.g. rotate-box-left/right.. :=] > > Few image editors do this well if at all (including imagemagick). > > elisp certainly has fast enough routines available with `asin' `atan' et al. > If you should happen to find a way to make the box happen please > consider leaving room for rotations - design constraints permitting of > course. > > FWIW the ability to rotate/skew boxes in OCR apps is one of the > aspects of that task that is lacking in nearly all commercial products > (the free counterparts all seem to be based on the same legacy HP code > as the commercial derivatives) and it seriously hinders the viability > of the output. > > If a bounding box could be implemented as a working part of Emacs > there are some really amazing applications for applying > annotations/text-properties/alist lookups on 'regions' of processed > text/images... This should be possible by drawing a SVG image on top of another image. The SVG image is XML which can be generated in a buffer within Emacs. One difficulty with this aproach is that there isnt really much support for alpha channels in Emacs. Also latency in interactive use might not be spectacular. I havent used commercial OCR much at all, so its interesting to hear your view. > > s_P -- Joakim Verona