User Story
As a software developer,
I want the extract_significant_frames method to consistently use the class-level threshold value
so that video analysis respects the configured quality standard and avoids unexpected behavior.
Background
The extract_significant_frames method in frame_story/video_describer.py currently declares a threshold parameter that shadows the class-level self.threshold initialized in VideoDescriber.__init__(). This causes the method to ignore the instance's configured threshold, leading to inconsistent frame extraction results. For example, users setting threshold=25000 during VideoDescriber initialization expect this value to govern frame extraction, but the method instead uses its default parameter value of 50000 unless explicitly overridden in calls. This violates the principle of least surprise and creates maintenance challenges.
Acceptance Criteria
User Story
As a software developer,
I want the
extract_significant_framesmethod to consistently use the class-levelthresholdvalueso that video analysis respects the configured quality standard and avoids unexpected behavior.
Background
The
extract_significant_framesmethod inframe_story/video_describer.pycurrently declares athresholdparameter that shadows the class-levelself.thresholdinitialized inVideoDescriber.__init__(). This causes the method to ignore the instance's configured threshold, leading to inconsistent frame extraction results. For example, users settingthreshold=25000duringVideoDescriberinitialization expect this value to govern frame extraction, but the method instead uses its default parameter value of 50000 unless explicitly overridden in calls. This violates the principle of least surprise and creates maintenance challenges.Acceptance Criteria
extract_significant_framesinvideo_describer.pyto remove thethresholdparameter and useself.thresholdfor frame difference calculationsget_video_descriptionsmethod call toextract_significant_framesto remove threshold argument passingtests/test_video_describer.pyverifying that class-initialized threshold values correctly influence frame extraction:VideoDescriberinstance withthreshold=30000thresholdduringVideoDescriberinitialization still uses default 50000 viaself.thresholdVideoDescriber(threshold=25000)) produce expected behavior post-fix