I have managed to pull out all taxonomy terms stored on my WP site like this:
$terms = get_terms( 
             array (
                'taxonomy' => 'portfolio-category',
                'hide_empty' => false,
             ));   
print "<pre>";
print_r($terms);
print "</pre>";
This would give me something like this back:
[4] => WP_Term Object
    (
        [term_id] => 74
        [name] => Homepage Thumbnail
        [slug] => homepage-thumbnail
        [term_group] => 0
        [term_taxonomy_id] => 74
        [taxonomy] => portfolio-category
        [description] => 
        [parent] => 0
        [count] => 11
        [filter] => raw
        [term_order] => 0
    )
But what if I have a page like www.mysite.com/portfolio-category/homepage-thumbnail where portfolio-category is the taxonomy and homepage-thumbnail is the slug, as they are both in the URL is there a way I can grab the term_taxonomy_id for the current page?