Q:

Minimum number of stickers to inspect in a Rubik cube to define a scrambled position?

This is for a robotics solver using a real cube. How many facelets must the machine check to figure out the position of everything in a scrambled cube? 

A:

To guarantee a valid representation (note that this is necessarily an upper bound), you need to scan 39 stickers.

2 from centers: You know the sticker opposite any center you scan, and the direction of the stickers is fixed. Therefore, with two stickers, you know the opposite stickers by default. Then, the other two stickers have two possible orientations, but only one will match what you know about the cube.
15 from corners: To tell the third color on a corner, you only need to scan two of its stickers. While it's possible to have two corners come up with the same two stickers, it's not possible for them to have the same orientation. In other words, if you placed the RBY corner and RBW corner such that Y/W pointed down, you'd end up with one corner with RB, and one with BR. 
Consequently, there's no ambiguity if you scan two stickers. That's 2 stickers by 8 corners is 16 stickers.
Why 15, though? Well, you know exactly what the last corner is right out of the box. All you need to know is its orientation, which you only need one sticker to determine. The other two colors are in a fixed order relative to that sticker.
22 from edges: Unfortunately, you don't have much leeway when scanning edges. Since it's possible to cycle any three edges, the only case you can be sure to have full information about is when there are two edges left, each with one sticker you know and one you don't. There's only one valid position here, because the two edges can't be swapped freely. In any other case, the edges could be swapped and you wouldn't know.

From this, $2+15+22=39$. However, strictly speaking, this is far from the ideal algorithm. 
A worst-case analysis won't give you an optimal scan.
The above is the worst-case maximum, and represents an upper bound. It is not, however, an ideal scan. To scan with as few stickers as possible, this is what you need to do:
Create two internal tables in the program's memory: one for corners, and one for edges. (Centers are trivial and don't warrant a table.) Whenever you scan a sticker, add it to that piece's list of stickers, and see if there is more than one possible piece in the index those stickers could be.
This will always net you less than 40 scans - 39 is the worst-case, which is what happens when at every point, you can't make any deductions. 
However, there are a few cases which the above won't strictly trap for that could reduce the number of stickers you need to scan. For corners, let's say you have three corners left: RBY, WRG, GYO. If you scan a white sticker, you don't need to scan anything else: you know you've found the WRG corner, and can remove it from the list. 
By a similar token, let's say you had WRG, WGO left, and you've already scanned both the W stickers. The next time you scan one of these pieces, let's say you see G. You then know that the corner you're looking at is WGO - but not only that, if you re-evaluate the table, you'll easily see that the other white sticker must belong to the WRG corner. 
The same methods apply to edges.

