Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.ip.gabor bob.ip.gabor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.ip.gaborbob.ip.gabor
  • Issues
  • #2
Closed
Open
Issue created Feb 14, 2017 by Tiago de Freitas Pereira@tiago.pereiraOwner

Issue when the nodes of the graph are set manually

Hi, I'm working with some periocular images and I did a customized way to define graph. I know that you can do that setting the keyword argument nodes in bob.ip.gabor.Graph(nodes=nodes).

My script is failing with the exception IndexError: tuple index out of range, which is weird.

I created a simple script that reproduces the problem.

import bob.ip.gabor
import bob.io.base
import bob.io.image
import bob.ip.color
import numpy
import math

image = bob.ip.color.rgb_to_gray(bob.io.base.load("landmark.png"))

# create Gabor wavelet transform class
gwt = bob.ip.gabor.Transform(
    number_of_scales = 5,
    number_of_directions = 8,
    sigma = 2. * math.pi,
    k_max = math.pi / 2.,
    k_fac = math.sqrt(.5),
    power_of_k = 0,
    dc_free = True)


for i in range(2):
    trafo_image = numpy.ndarray((gwt.number_of_wavelets, image.shape[0], image.shape[1]),
                                     numpy.complex128)

    nodes = [(10,10),(10,20),(10,30),
             (20,10),(20,20),(20,30)]
    graph = bob.ip.gabor.Graph(nodes=nodes)
    #graph = bob.ip.gabor.Graph(first=(10,10), last=(100,100), step=(10,10))

    # perform Gabor wavelet transform
    gwt.transform(image, trafo_image)
    jets = graph.extract(trafo_image)

    print len(jets)

Here we have the exception raised:

Traceback (most recent call last):
  File "error_gabor.py", line 20, in <module>
    for i in range(2):
IndexError: tuple index out of range

When I try to debug with ipdb, the exception is not raised. I suspect that we have a memory issue.

We don't have this issue when we I set the grid automatically.

Follow attached the image

landmark

Assignee
Assign to
Time tracking