_set ( attrib, val, op = '', log = None ) ¶ _setCurrent() method which handles the switch. ‘viewfinder’ of sorts for the camera to view a live video stream on a This enables the ImageStim to be used as a This method is used internally to copy pixel data from a camera object _movieFrameToTexture ( movieSrc ) ¶Ĭonvert a movie frame to a texture and use it. Requires self.rgb, lorSpace and ntrast _getPolyAsRendered ( ) ¶ĭEPRECATED. _getDesiredRGB ( rgb, colorSpace, contrast ) ¶Ĭonvert color to RGB while adding contrast. Wrapping ( bool) – Enable wrapping of the texture. Otherwise the wrapping of the texture will notĭataType (class: ~pyglet.gl.GLenum, int or None) – None, GL_UNSIGNED_BYTE, GL_FLOAT. ![]() Stimuli (anything that needs multiple cycles) forcePOW2 should be MaskParams ( dict or None) – Additional parameters to configure the mask used with this texture.įorcePOW2 ( bool) – Force the texture to be stored in a square memory area. Res ( int) – The resolution of the texture (unless a bitmap image is used). Stim ( Any) – Stimulus object using the texture. ![]() PixFormat ( GLenum or int) – Pixel format to use, values can be GL_ALPHA or GL_RGB. Value can be anything that resembles image data. ![]() _calcSizeRendered ( ) ¶īy _updateVertices() and verticesPix _createTexture ( tex, id, pixFormat, stim, res = 128, maskParams = None, forcePOW2 = True, dataType = None, wrapping = True ) ¶Ĭreate a new OpenGL 2D image texture. This functionality is now handledīy _updateVertices() and verticesPix. Legacy property for setting the foreground color of a stimulus in RGB, instead use obj._foreColor.rgb TypeĭEPRECATED in 1.80.00. ImageStim ( win, image = None, mask = None, units = '', pos = 0.0, 0.0, size = None, anchor = 'center', ori = 0.0, color = 1.0, 1.0, 1.0, colorSpace = 'rgb', contrast = 1.0, opacity = None, depth = 0, interpolate = False, flipHoriz = False, flipVert = False, texRes = 128, name = None, autoLog = None, maskParams = None ) ¶ĭisplay an image on a property RGB ¶ Whether every change in this stimulus should be auto logged.ĭetermines whether the stimulus should be automatically drawn on every frame flip.Ĭlear all textures associated with the stimulus.ĭetails ¶ class psychopy.visual. The name ( str) of the object to be using during logged messages about this stim. Returns True if this stimulus intersects another one. Returns True if a point x,y is inside the stimulus’ border. Whether to interpolate (linearly) the texture in the stimulus. The name of the color space currently being usedĭetermines how visible the stimulus is relative to background. ![]() The size (width, height) of the stimulus in the stimulus unitsĪ value that is simply multiplied by the color. The orientation of the stimulus (in degrees). The position of the center of the stimulus in the stimulus units Usually you can use ‘stim.attribute = value’ syntax instead, but use this method if you need to suppress the log message. The Window object in which the stimulus will be rendered by default. Now the color codes are generated.ImageStim(win)ĭisplay an image on a And then using the join() function to join the # and color code. Next to creating a for loop to iterate 50 times to get 50 different colors. Rand_colors = )]įirst, importing a random module to get the random colors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |