janalysis/dct.py
def _get_twod_value_dct2(output_row_index, output_column_index, two_d_array):
    """Does the actual computation for each entry in the 2d orthonormal dct.
    :param output_row_index: The row index of the entry to be calculated
    :type output_row_index: unsigned int.
    :param output_column_index: The column index of the entry to be calculated.
    :type output_column_index: unsigned int.
    :param two_d_array: The input 2d array that is being transformed.
    :type two_d_array: numpy.array.
    :returns: double -- The value calculated for the specific matrix entry.
    """
    value = 0
    row_size = two_d_array.shape[0]
    column_size = two_d_array.shape[1]
    for row_index, row in enumerate(two_d_array):
        for column_index in range(row.size):
            argx = (row_index+0.5) * output_row_index * pi / row_size
            argy = (column_index+0.5) * output_column_index * pi / column_size
            value += two_d_array[row_index][column_index]*cos(argx)*cos(argy)
    value *= 4  # No idea why this 4 needs to be here, but it does
    value *= _get_normalization_factor(output_row_index, row_size)
    value *= _get_normalization_factor(output_column_index, column_size)
    return value
Does the actual computation for each entry in the 2d orthonormal dct.
    :param output_row_index: The row index of the entry to be calculated
    :type output_row_index: unsigned int.
    :param output_column_index: The column index of the entry to be calculated.
    :type output_column_index: unsigned int.
    :param two_d_array: The input 2d array that is being transformed.
    :type two_d_array: numpy.array.
    :returns: double -- The value calculated for the specific matrix entry.
    
Does the actual computation for each entry in the 2d orthonormal dct.
Does the actual computation for each entry in the 2d orthonormal dct .
def _get_twod_value_dct2(output_row_index, output_column_index, two_d_array):
    value = 0
    row_size = two_d_array.shape[0]
    column_size = two_d_array.shape[1]
    for row_index, row in enumerate(two_d_array):
        for column_index in range(row.size):
            argx = (row_index+0.5) * output_row_index * pi / row_size
            argy = (column_index+0.5) * output_column_index * pi / column_size
            value += two_d_array[row_index][column_index]*cos(argx)*cos(argy)
    value *= 4  
    value *= _get_normalization_factor(output_row_index, row_size)
    value *= _get_normalization_factor(output_column_index, column_size)
    return value
def _get_twod_value_dct2 ( output_row_index , output_column_index , two_d_array ) : value = 0 row_size = two_d_array . shape [ 0 ] column_size = two_d_array . shape [ 1 ] for row_index , row in enumerate ( two_d_array ) : for column_index in range ( row . size ) : argx = ( row_index + 0.5 ) * output_row_index * pi / row_size argy = ( column_index + 0.5 ) * output_column_index * pi / column_size value += two_d_array [ row_index ] [ column_index ] * cos ( argx ) * cos ( argy ) value *= 4 value *= _get_normalization_factor ( output_row_index , row_size ) value *= _get_normalization_factor ( output_column_index , column_size ) return value
Does the actual computation for each entry in the 2d orthonormal dct.
Does the actual computation for each entry in the 2d orthonormal dct .
"""Does the actual computation for each entry in the 2d orthonormal dct.
    :param output_row_index: The row index of the entry to be calculated
    :type output_row_index: unsigned int.
    :param output_column_index: The column index of the entry to be calculated.
    :type output_column_index: unsigned int.
    :param two_d_array: The input 2d array that is being transformed.
    :type two_d_array: numpy.array.
    :returns: double -- The value calculated for the specific matrix entry.
    """ # No idea why this 4 needs to be here, but it does
- The value calculated for the specific matrix entry.
- The value calculated for the specific matrix entry .
output_row_index
The row index of the entry to be calculated
The row index of the entry to be calculated
output_column_index
The column index of the entry to be calculated.
The column index of the entry to be calculated .
two_d_array
The input 2d array that is being transformed.
The input 2d array that is being transformed .