[FieldTrip] 3D Scan Data - texture size error

Rainer Scharf rainer.scharf at student.tugraz.at
Mon Jul 6 13:17:58 CEST 2020


Hi  Jan,

Thanks so much for your reply!
Thats really seems to be the case. I inspected the object file closely and found the miss-match.

The list of geometric vertices (v) has not the same amount as the texture coordinates (vt)
I tried different scans and different export options, it has an effect on it but it is never matching. 
Other programs like Cinema 4D can open it easily (so I assume the file is not corrupted).

By a bit research I found that v and vt seems do not necessarily need to match in general.

In the following link you can find my scan. Skanect is exporting the files exactly like that.
As mentioned before, Skanect is providing .png instead of .jpg

https://www.dropbox.com/sh/9pnjpq5wofs2h7i/AABieWNZhPstKlDE8m3OFX0ia?dl=0

Best
Rainer


> Am 06.07.2020 um 09:31 schrieb Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>:
> 
> Hi Rainer,
> 
> The error message suggests that there’s an unexpected (at least by Fieldtrip) mismatch between the ’texture’ specification in the .obj file, as compared to the number of points that are in the same .obj file.  That is, there’s a mismatch between the variables that are outputted by the function read_obj_new (in fieldtrip/fileio/private). Assuming that the implementation of this referenced function is correct (i.e. that it reads the file correctly), it suggests that your obj-file either is corrupt, or that it has been formatted in a way that is not anticipated by the reading function. 
> 
> Could you confirm the mismatch by setting a breakpoint in ft_read_headshape and compare the number of returned texture points in relation to the number of point points?
> 
> Would it be possible to share the combined (obj/jpg/mtl) files so that we can have a look?
> 
> Best wishes,
> JM
> 
>> On 5 Jul 2020, at 12:37, Rainer Scharf <rainer.scharf at student.tugraz.at <mailto:rainer.scharf at student.tugraz.at>> wrote:
>> 
>> Dear Community,
>> 
>> I’m trying to localize electrodes using a 3D Scanner according to the 3dscanner tutorial.
>> Everything works for the scan provided in the tutorial.
>> 
>> I use the Skanect Occipital Structure sensor (for computer) not the one for the iPad as shown in the tutorial.
>> 
>> After exporting the data from Skanect I get an OBJ- ,PNG- and MTL-File.
>> (The fieldtrip code is expecting a jpg-file)
>> 
>> I converted the png file to jpg and also tried to let Matlab use the png-file directly, but it seems to me the texture is not matching with the structure information as the code expects it.
>> (Other programs like cinema 4D are matching it without any problems.)
>> 
>> When I run the code I get an error in the refine - function:
>> Error using refine (line 72)
>> invalid size of texture
>> 
>> I’m using fieldtrip-20200607 
>> 
>> Thanks in advances for your advices and support,
>> 
>> All the Best 
>> Rainer
>> 
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>> https://doi.org/10.1371/journal.pcbi.1002202
> 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200706/b50aae43/attachment.htm>


More information about the fieldtrip mailing list