Add "Find Similar Frames" feature #669

Closed
opened 2012-03-15 23:39:34 +00:00 by rlx · 1 comment
Owner

Once we save a timeline with each frame resized to 8x8, we can use this to "hash" frames. For example, we can set each pixel to black (darker than average) or (white) and get a 64-bit integer. Frames with the same hash will feature similar shapes. Another hash could be computed with a 4 x 2 grid, and 8 bit color information per grid cell.

UI-wise, this doesn't represent a list or item view, so it would be implemented as a menu entry, active whenever a clip is selected or a video position is present, and open a dialog that has an icon list with all frames with the same hash.

Once we save a timeline with each frame resized to 8x8, we can use this to "hash" frames. For example, we can set each pixel to black (darker than average) or (white) and get a 64-bit integer. Frames with the same hash will feature similar shapes. Another hash could be computed with a 4 x 2 grid, and 8 bit color information per grid cell. UI-wise, this doesn't represent a list or item view, so it would be implemented as a menu entry, active whenever a clip is selected or a video position is present, and open a dialog that has an icon list with all frames with the same hash.
rlx added the
general
label 2012-03-15 23:39:34 +00:00
rlx added this to the 12.04 milestone 2012-03-15 23:39:34 +00:00
0x2620 was assigned by rlx 2012-03-15 23:39:34 +00:00
rlx added the
major
enhancement
labels 2012-03-15 23:39:34 +00:00
Author
Owner

This is not about frames, but about sequences (consecutive frames with the same hash).

For both shape and color mode, we need a table with sequenceid and hash, plus two new API functions:

pandora.api.getSequence({
    id: itemid,
    mode: mode,
    position: position
}, function(result) {
    // result.data is {hash, in, out, videoRatio}
    // display in-to-out video player for sequence at position
    // then use the following as items option of an IconList
    // with 'title (director)' as title and 'in - out' as info
    pandora.api.findSequences({
        // id is 'itemid/in-out'
        keys: ['director', 'id', 'title', 'videoRatio'],
        query: {
            conditions: [
                {key: mode, value: data.hash, operator: '=='},
                {key: 'id', value: id + '/' + in + '-' + out, operator: '!='}
            ],
            operator: '&'
        },
        range: [0, 100],
        // key can be 'title', 'director', 'position', 'duration'
        sort: [{key: 'director', operator: '+'}],
    }, function(result) {
        // result.data.items is [{director, id, title, videoRatio}]
    });
});
// we may want to allow for 'year' and 'country' as sort keys,
// and display 'title (year)' or 'title (country)' in these cases
This is not about frames, but about sequences (consecutive frames with the same hash). For both shape and color mode, we need a table with sequenceid and hash, plus two new API functions: ``` pandora.api.getSequence({ id: itemid, mode: mode, position: position }, function(result) { // result.data is {hash, in, out, videoRatio} // display in-to-out video player for sequence at position // then use the following as items option of an IconList // with 'title (director)' as title and 'in - out' as info pandora.api.findSequences({ // id is 'itemid/in-out' keys: ['director', 'id', 'title', 'videoRatio'], query: { conditions: [ {key: mode, value: data.hash, operator: '=='}, {key: 'id', value: id + '/' + in + '-' + out, operator: '!='} ], operator: '&' }, range: [0, 100], // key can be 'title', 'director', 'position', 'duration' sort: [{key: 'director', operator: '+'}], }, function(result) { // result.data.items is [{director, id, title, videoRatio}] }); }); // we may want to allow for 'year' and 'country' as sort keys, // and display 'title (year)' or 'title (country)' in these cases ```
rlx added the
fixed
label 2012-07-01 07:48:34 +00:00
rlx closed this issue 2012-07-01 07:48:34 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#669
No description provided.