Subversion Repositories SmartDukaan

Rev

Rev 1915 | Rev 2657 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1915 Rev 2051
Line 15... Line 15...
15
            resolution = features.get("Resolution") 
15
            resolution = features.get("Resolution") 
16
            if len(resolution) > 0 :
16
            if len(resolution) > 0 :
17
                resolution = float(resolution[0])
17
                resolution = float(resolution[0])
18
                print "resolution=" + `resolution`
18
                print "resolution=" + `resolution`
19
                
19
                
20
                if resolution <= 1.3 :
20
                if resolution <= 1.0 :
21
                    resolution_score = 2.0
21
                    resolution_score = 2.0
22
                    
22
                    
23
                elif resolution >= 8 :
23
                elif resolution >= 8 :
24
                    resolution_score = 10.0
24
                    resolution_score = 10.0
25
                    
25
                    
26
                else :
26
                else :
27
                    resolution_score = 2.0 + (resolution - 1.3) / (8 - 1.3) * (10 - 2)
27
                    resolution_score = 2.0 + (resolution - 1.0) / (8 - 1.0) * (10 - 2)
28
 
28
 
29
        if features.has_key("Flash") :
29
        if features.has_key("Flash") :
30
            flash = features.get("Flash")
30
            flash = features.get("Flash")
31
            if len(flash) > 0 :
31
            if len(flash) > 0 :
32
                flash = flash[0]
32
                flash = flash[0]