Getting a little further. Message is now basically:
 
 
>  examining image pair (0, 1)
>
> overlap area: 11736755.252809558 pixels
>
> overlap ratio: 0.729671189939638
>
> overlap area: 11524660.939996947 pixels
>
> overlap ratio: 0.7164853386310013
>
> setting subpano width to 7278
>
> creating warped overlap images with woa_base.pto
>
> cp detection: cpfind ['--fullscale', '--sieve2size', '5', '--ransacmode', 
> 'hom', '-o', 'woa_warped.pto', '_woa_warped.pto']
>
> CPG found 80 CPs
>
> matching pair (0, 1) failed with TypeError: "float() argument must be a 
> string or a number"
>
> stack traceback
>
The suggetsed mod works with Python2.7
 
Brian
 
 

On Friday, 17 May 2013 20:10:49 UTC+10, kfj wrote:

>
>
> On Wednesday, May 15, 2013 12:39:15 PM UTC+2, smib wrote:
>
> matching pair (1, 2) failed with TypeError: "can't use a string 
>> pattern on a bytes-like object" 
>>
>
> Okay. Figured it out. The key is this last message, can't use a string...
>
> The problem is due to the use of python 3. I hadn't tested woa under 
> python 3, and obviously noone else has, either. So an error could stay 
> undetected: to analyze tiffdump's output, the output is matched with 
> regular expressions to filter out the bits which interest us. There, the re 
> search patterns are given as string literals. This is fine in python 2.x, 
> but python 3.x expects byte literals. Now this is easy to fix and doesn't 
> break it for python 2.X either, because the relevant literal modifier, a 
> prefixed 'b', is simply ignored in python 2.x. I'd ask you to midify woa.py 
> in lines 237 and 238. The current version is
>
>         fieldname = re.match ( r'[^\(]+' , t ) . group(0) . strip()
>         fieldcontent = re.match ( r'([^<]+<)([^>]+)' , t )
>
> please insert the additional 'b' so that the lines read
>
>         fieldname = re.match ( br'[^\(]+' , t ) . group(0) . strip()
>         fieldcontent = re.match ( br'([^<]+<)([^>]+)' , t )
>
> this should fix the problem. If it does, please let me know so that I can 
> send in a patch. If it doesn't , well..., let me know too, but I hope this 
> is it ;-)
>
> Kay 
>
>>
>>
>> Cheers 
>>
>> On May 10, 7:30 pm, kfj <_...@yahoo.com> wrote: 
>> > On Thursday, May 9, 2013 12:13:03 PM UTC+2, smib wrote: 
>> > 
>> > > Hi  Kay 
>> > 
>> > > I've noticed the same issue with my win 32 bit build using MSVC2010 
>> from 
>> > > last weekend. Woa works fine from the command line and from an 
>> earlier 
>> > > build (built with MSVC2008). The 'limit to 5 points' script works 
>> from my 
>> > > recent build but the woa script returns -1 after calling Nona and 
>> then 
>> > > CPfind. From what I can see woa has not changed so i guess that there 
>> must 
>> > > be a recent code change somewhere that is conflicting 
>> > 
>> > Interesting. The next thing in line from calling the cpg is calling 
>> > tiffdump, in order to get the information about the cropping in the 
>> cropped 
>> > TIFF which nona produces - this might be where things go awry. Would 
>> you be 
>> > so kind and run woa from the command line with --verbose to make it 
>> more 
>> > chatty, capture all console output and post that? It might give me more 
>> of 
>> > a clue where things go wrong, particularly if the problem raises an 
>> > exception and I can see from the stack trace where it tripped. 
>> > 
>> > Of course there's always the possibility of an incompatible change in 
>> > hugin's API... I don't think anyone cares overly much about breaking 
>> the 
>> > very few extant python plugins. The python interface itself adapts to 
>> every 
>> > new version of the API automatically, but when an 'old' plugin tries to 
>> > call what it could safely call when it was written, and what is called 
>> has 
>> > changed in the meantime, it may well fail. That's why Yuv coded an API 
>> > version check into the system, which resulted in all plugins being 
>> disabled 
>> > in a previous release, because noone had minded the mechanism and 
>> checked 
>> > and updated them when they were found compatible... I guess it will 
>> take a 
>> > 'killer plugin' which everyone wants to make the plugin interface more 
>> > popular, and while all the issues about lacking concurrency and 
>> inability 
>> > of plugins to communicate with the user remain there is probably little 
>> > chance for that :( 
>> > 
>> > Kay 
>> > 
>> > 
>> > 
>> > > On Thursday, 9 May 2013 05:18:32 UTC+10, kfj wrote: 
>> > 
>> > >> On Monday, May 6, 2013 9:55:41 PM UTC+2, Giancarlo Todone wrote: 
>> > 
>> > >>>  -1 means that the call to the plugin interface has failed. Can you 
>> > >>>> call any of the other plugins? And can you run woa from the 
>> command line? 
>> > >>>> What system and what version of hugin are you using? 
>> > 
>> > >>> Right now i'm on Windows 8 x64 but I'm using Hugin 2012.0.0 x86 
>> because 
>> > >>> x64 version gives problems on UI (some missing controls). I tried 
>> 2012 and 
>> > >>> 2013 beta  x86/x64 normal/hsi with same results: all of the scripts 
>> return 
>> > >>> -1. 
>> > >>> I tried calling "python woa.py" in the scripts folder: it complains 
>> > >>> about lack of hsi include. Didn't experiment further (but will with 
>> my 
>> > >>> Ubuntu10.04 install) 
>> > 
>> > >> Well, lack of hsi means that you don't have a hugin built with 
>> python 
>> > >> support. If you build yourself, you can get the python interface by 
>> > >> building with these cmake flags 
>> > 
>> > >> -DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0 
>> > 
>> > >> It should at any rate be much easier getting it to run on 
>> > >> Linux. Just follow the wiki: 
>> > 
>> > >>http://wiki.panotools.org/Hugin_Compiling_Ubuntu 
>> > 
>> > >> Once you have built hugin with the python interface, you can 
>> > >> test easily whether you've succeeded by just opening a python 
>> > >> session and typing 
>> > 
>> > >> import hsi 
>> > 
>> > >> at the python prompt. If that succeeds, you should be fine. 
>> > >> Why the Windows build you have allows you to call a plugin when 
>> > >> the python interface isn't there, I don't know. 
>> > 
>> > >> Kay- Hide quoted text - 
>> > 
>> > - Show quoted text - 
>>
>

-- 
-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx

--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to